From a7f7627c27d0d287edeefeb115f98de9dee58bab Mon Sep 17 00:00:00 2001 From: Jimmy Date: Fri, 11 Oct 2024 23:51:12 +0800 Subject: [PATCH 01/32] add benchmark files --- .../OpCode/Arithmetic/OpCode.GE.cs | 22 +++ .../OpCode/Arithmetic/OpCode.GT.cs | 22 +++ .../OpCode/Arithmetic/OpCode.LE.cs | 22 +++ .../OpCode/Arithmetic/OpCode.LT.cs | 22 +++ .../OpCode/Arithmetic/OpCode.MODMUL.cs | 22 +++ .../OpCode/Arithmetic/OpCode.MODPOW.cs | 22 +++ .../OpCode/Arithmetic/OpCode.NOT.cs | 22 +++ .../OpCode/Arithmetic/OpCode.NUMEQUAL.cs | 22 +++ .../OpCode/Arithmetic/OpCode.NUMNOTEQUAL.cs | 22 +++ .../OpCode/Arithmetic/OpCode.POW.cs | 22 +++ .../OpCode/Arithmetic/OpCode.SHL.cs | 22 +++ .../OpCode/Arithmetic/OpCode.SHR.cs | 22 +++ .../OpCode/Arithmetic/OpCode.SIGN.cs | 22 +++ .../OpCode/Arithmetic/OpCode.SQRT.cs | 22 +++ .../OpCode/Arrays/OpCode.APPEND.cs | 22 +++ .../OpCode/Arrays/OpCode.CLEARITEMS.cs | 22 +++ .../OpCode/Arrays/OpCode.HASKEY.cs | 22 +++ .../OpCode/Arrays/OpCode.KEYS.cs | 22 +++ .../OpCode/Arrays/OpCode.NEWARRAY.cs | 22 +++ .../OpCode/Arrays/OpCode.NEWARRAY0.cs | 22 +++ .../OpCode/Arrays/OpCode.NEWARRAYUT.cs | 22 +++ .../OpCode/Arrays/OpCode.NEWMAP.cs | 22 +++ .../OpCode/Arrays/OpCode.NEWSTRUCT.cs | 22 +++ .../OpCode/Arrays/OpCode.NEWSTRUCT0.cs | 22 +++ .../OpCode/Arrays/OpCode.PACK.cs | 22 +++ .../OpCode/Arrays/OpCode.PACKMAP.cs | 22 +++ .../OpCode/Arrays/OpCode.PACKSTRUCT.cs | 22 +++ .../OpCode/Arrays/OpCode.PICKITEM.cs | 22 +++ .../OpCode/Arrays/OpCode.REMOVE.cs | 22 +++ .../OpCode/Arrays/OpCode.REVERSEITEMS.cs | 22 +++ .../OpCode/Arrays/OpCode.ReverseN.cs | 136 ------------------ .../OpCode/Arrays/OpCode.SETITEM.cs | 22 +++ .../OpCode/Arrays/OpCode.SIZE.cs | 22 +++ .../OpCode/Arrays/OpCode.UNPACK.cs | 22 +++ .../OpCode/Arrays/OpCode.VALUES.cs | 22 +++ .../OpCode/BitwiseLogic/OpCode.AND.cs | 22 +++ .../OpCode/BitwiseLogic/OpCode.EQUAL.cs | 22 +++ .../OpCode/BitwiseLogic/OpCode.INVERT.cs | 22 +++ .../OpCode/BitwiseLogic/OpCode.NOTEQUAL.cs | 22 +++ .../OpCode/BitwiseLogic/OpCode.OR.cs | 22 +++ .../OpCode/BitwiseLogic/OpCode.XOR.cs | 22 +++ .../OpCode/Control/OpCode.ABORT.cs | 22 +++ .../OpCode/Control/OpCode.ABORTMSG.cs | 22 +++ .../OpCode/Control/OpCode.ASSERT.cs | 22 +++ .../OpCode/Control/OpCode.ASSERTMSG.cs | 22 +++ .../OpCode/Control/OpCode.CALL.cs | 22 +++ .../OpCode/Control/OpCode.CALLA.cs | 22 +++ .../OpCode/Control/OpCode.CALLUL.cs | 22 +++ .../OpCode/Control/OpCode.JMP.cs | 22 +++ .../OpCode/Control/OpCode.JMPEQ.cs | 22 +++ .../OpCode/Control/OpCode.JMPEQUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPGE.cs | 22 +++ .../OpCode/Control/OpCode.JMPGEUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPGT.cs | 22 +++ .../OpCode/Control/OpCode.JMPGTUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPIF.cs | 22 +++ .../OpCode/Control/OpCode.JMPIFNOT.cs | 22 +++ .../OpCode/Control/OpCode.JMPIFNOTUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPIFUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPLE.cs | 22 +++ .../OpCode/Control/OpCode.JMPLEUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPLT.cs | 22 +++ .../OpCode/Control/OpCode.JMPLTUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPNE.cs | 22 +++ .../OpCode/Control/OpCode.JMPNEUL.cs | 22 +++ .../OpCode/Control/OpCode.JMPUL.cs | 22 +++ .../OpCode/Control/OpCode.NOP.cs | 22 +++ .../OpCode/Control/OpCode.RET.cs | 22 +++ .../OpCode/Control/OpCode.SYSCALL.cs | 22 +++ .../OpCode/Control/OpCode.THROW.cs | 22 +++ .../OpCode/Control/OpCode.TRYUCATCH.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY10.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY2.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY3.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY4.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY5.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY6.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY7.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY8.cs | 22 +++ .../Control/OpCode.TRYUCATCHUFINALLY9.cs | 22 +++ .../OpCode/Control/OpCode.TRYUFINALLY.cs | 22 +++ .../OpCode/Push/OpCode.PUSHA.cs | 22 +++ .../OpCode/Push/OpCode.PUSHDATA1.cs | 22 +++ .../OpCode/Push/OpCode.PUSHDATA2.cs | 22 +++ .../OpCode/Push/OpCode.PUSHDATA4.cs | 22 +++ .../Push/OpCode.PUSHINT8UtoUPUSHINT256.cs | 22 +++ .../OpCode/Push/OpCode.PUSHM1UtoUPUSH16.cs | 22 +++ .../OpCode/Push/OpCode.PUSHNULL.cs | 22 +++ .../OpCode/Slot/OpCode.INITSLOT.cs | 22 +++ .../OpCode/Slot/OpCode.INITSSLOT.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG0.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG1.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG2.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG3.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG4.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG5.cs | 22 +++ .../OpCode/Slot/OpCode.LDARG6.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC0.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC1.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC2.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC3.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC4.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC5.cs | 22 +++ .../OpCode/Slot/OpCode.LDLOC6.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD0.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD1.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD2.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD3.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD4.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD5.cs | 22 +++ .../OpCode/Slot/OpCode.LDSFLD6.cs | 22 +++ .../OpCode/Slot/OpCode.STARG.cs | 22 +++ .../OpCode/Slot/OpCode.STARG0.cs | 22 +++ .../OpCode/Slot/OpCode.STARG1.cs | 22 +++ .../OpCode/Slot/OpCode.STARG2.cs | 22 +++ .../OpCode/Slot/OpCode.STARG3.cs | 22 +++ .../OpCode/Slot/OpCode.STARG4.cs | 22 +++ .../OpCode/Slot/OpCode.STARG5.cs | 22 +++ .../OpCode/Slot/OpCode.STARG6.cs | 22 +++ .../OpCode/Slot/OpCode.STLOC.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD0.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD1.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD2.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD3.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD4.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD5.cs | 22 +++ .../OpCode/Slot/OpCode.STSFLD6.cs | 22 +++ .../OpCode/Splice/OpCode.CAT.cs | 22 +++ .../OpCode/Splice/OpCode.LEFT.cs | 22 +++ .../OpCode/Splice/OpCode.MEMCPY.cs | 22 +++ .../OpCode/Splice/OpCode.NEWBUFFER.cs | 22 +++ .../OpCode/Splice/OpCode.RIGHT.cs | 22 +++ .../OpCode/Splice/OpCode.SUBSTR.cs | 22 +++ .../OpCode/Stack/OpCode.CLEAR.cs | 22 +++ .../OpCode/Stack/OpCode.DEPTH.cs | 22 +++ .../OpCode/Stack/OpCode.DROP.cs | 22 +++ .../OpCode/Stack/OpCode.NIP.cs | 22 +++ .../OpCode/Stack/OpCode.OVER.cs | 22 +++ .../OpCode/Stack/OpCode.PICK.cs | 22 +++ .../OpCode/Stack/OpCode.REVERSE3.cs | 22 +++ .../OpCode/Stack/OpCode.REVERSE4.cs | 22 +++ .../OpCode/Stack/OpCode.REVERSEN.cs | 47 ++++++ .../OpCode/Stack/OpCode.ROLL.cs | 22 +++ .../OpCode/Stack/OpCode.ROT.cs | 22 +++ .../OpCode/Stack/OpCode.SWAP.cs | 22 +++ .../OpCode/Stack/OpCode.TUCK.cs | 22 +++ .../OpCode/Stack/OpCode.XDROP.cs | 22 +++ .../OpCode/Types/OpCode.CONVERT.cs | 22 +++ .../OpCode/Types/OpCode.ISNULL.cs | 22 +++ .../OpCode/Types/OpCode.ISTYPE.cs | 22 +++ 155 files changed, 3413 insertions(+), 136 deletions(-) create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODMUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODPOW.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NOT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMEQUAL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMNOTEQUAL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.POW.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHR.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SIGN.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SQRT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.APPEND.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.CLEARITEMS.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.HASKEY.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.KEYS.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAYUT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWMAP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACK.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKMAP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKSTRUCT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PICKITEM.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REMOVE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REVERSEITEMS.cs delete mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.ReverseN.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SETITEM.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SIZE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.UNPACK.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.VALUES.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.AND.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.EQUAL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.INVERT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.NOTEQUAL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.OR.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.XOR.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORTMSG.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERTMSG.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLA.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQ.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGEUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGTUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIF.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOTUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLEUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLTUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNE.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNEUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPUL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.NOP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.RET.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.SYSCALL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.THROW.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCH.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY10.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY5.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY6.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY7.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY8.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY9.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUFINALLY.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHA.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA1.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHINT8UtoUPUSHINT256.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHM1UtoUPUSH16.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHNULL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSLOT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSSLOT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG1.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG5.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG6.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC1.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC5.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC6.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD1.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD5.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD6.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG1.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG5.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG6.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STLOC.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD0.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD1.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD2.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD5.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD6.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.CAT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.LEFT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.MEMCPY.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.NEWBUFFER.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.RIGHT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.SUBSTR.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.CLEAR.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DEPTH.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DROP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.NIP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.OVER.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.PICK.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE3.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE4.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSEN.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROLL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.SWAP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.TUCK.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.XDROP.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.CONVERT.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISNULL.cs create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISTYPE.cs diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs new file mode 100644 index 0000000000..e1a09d851e --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.GE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_GE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GT.cs new file mode 100644 index 0000000000..172ea593d2 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.GT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_GT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LE.cs new file mode 100644 index 0000000000..1555ea7b39 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LT.cs new file mode 100644 index 0000000000..4c340e0d95 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.LT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODMUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODMUL.cs new file mode 100644 index 0000000000..754abd6c0e --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODMUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.MODMUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_MODMUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODPOW.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODPOW.cs new file mode 100644 index 0000000000..dde01ef7c7 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.MODPOW.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.MODPOW.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_MODPOW : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NOT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NOT.cs new file mode 100644 index 0000000000..43b8d2f770 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NOT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NOT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NOT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMEQUAL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMEQUAL.cs new file mode 100644 index 0000000000..9fb2f6deb8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMEQUAL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NUMEQUAL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NUMEQUAL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMNOTEQUAL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMNOTEQUAL.cs new file mode 100644 index 0000000000..4b4b2607af --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.NUMNOTEQUAL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NUMNOTEQUAL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NUMNOTEQUAL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.POW.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.POW.cs new file mode 100644 index 0000000000..88190b6db5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.POW.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.POW.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_POW : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHL.cs new file mode 100644 index 0000000000..b8ded63194 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SHL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SHL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHR.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHR.cs new file mode 100644 index 0000000000..8517bb2df5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SHR.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SHR.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SHR : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SIGN.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SIGN.cs new file mode 100644 index 0000000000..8134f65aa5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SIGN.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SIGN.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SIGN : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SQRT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SQRT.cs new file mode 100644 index 0000000000..9892548d54 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.SQRT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SQRT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SQRT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.APPEND.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.APPEND.cs new file mode 100644 index 0000000000..acd5a3ec19 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.APPEND.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.APPEND.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_APPEND : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.CLEARITEMS.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.CLEARITEMS.cs new file mode 100644 index 0000000000..3806f37024 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.CLEARITEMS.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CLEARITEMS.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CLEARITEMS : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.HASKEY.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.HASKEY.cs new file mode 100644 index 0000000000..d6be8d8cda --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.HASKEY.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.HASKEY.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_HASKEY : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.KEYS.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.KEYS.cs new file mode 100644 index 0000000000..afe8ee2079 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.KEYS.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.KEYS.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_KEYS : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY.cs new file mode 100644 index 0000000000..77d396c8d7 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWARRAY.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWARRAY : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY0.cs new file mode 100644 index 0000000000..582c11645f --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAY0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWARRAY0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWARRAY0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAYUT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAYUT.cs new file mode 100644 index 0000000000..7749c2bcd8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWARRAYUT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWARRAYUT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWARRAYUT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWMAP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWMAP.cs new file mode 100644 index 0000000000..9f6c5b67cb --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWMAP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWMAP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWMAP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT.cs new file mode 100644 index 0000000000..4b69520792 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWSTRUCT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWSTRUCT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT0.cs new file mode 100644 index 0000000000..c67b1f448f --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.NEWSTRUCT0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWSTRUCT0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWSTRUCT0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACK.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACK.cs new file mode 100644 index 0000000000..5e06c1bd0a --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACK.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PACK.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PACK : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKMAP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKMAP.cs new file mode 100644 index 0000000000..6e3e3674e1 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKMAP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PACKMAP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PACKMAP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKSTRUCT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKSTRUCT.cs new file mode 100644 index 0000000000..2d8f15bab9 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PACKSTRUCT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PACKSTRUCT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PACKSTRUCT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PICKITEM.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PICKITEM.cs new file mode 100644 index 0000000000..dcf44cfab5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.PICKITEM.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PICKITEM.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PICKITEM : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REMOVE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REMOVE.cs new file mode 100644 index 0000000000..a7389e7858 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REMOVE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.REMOVE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_REMOVE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REVERSEITEMS.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REVERSEITEMS.cs new file mode 100644 index 0000000000..8bfa6c3ca7 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.REVERSEITEMS.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.REVERSEITEMS.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_REVERSEITEMS : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.ReverseN.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.ReverseN.cs deleted file mode 100644 index 515125ddc0..0000000000 --- a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.ReverseN.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2015-2024 The Neo Project. -// -// OpCode.ReverseN.cs file belongs to the neo project and is free -// software distributed under the MIT software license, see the -// accompanying file LICENSE in the main directory of the -// repository or http://www.opensource.org/licenses/mit-license.php -// for more details. -// -// Redistribution and use in source and binary forms with or without -// modifications are permitted. - -namespace Neo.VM.Benchmark.OpCode; - -public class OpCode_ReverseN : OpCodeBase -{ - protected override byte[] CreateScript(BenchmarkMode benchmarkMode) - { - var builder = new InstructionBuilder(); - var initBegin = new JumpTarget(); - builder.AddInstruction(new Instruction { _opCode = VM.OpCode.INITSLOT, _operand = [1, 0] }); - builder.Push(ItemCount); - builder.AddInstruction(VM.OpCode.STLOC0); - initBegin._instruction = builder.AddInstruction(VM.OpCode.NOP); - builder.Push(0); - builder.AddInstruction(VM.OpCode.LDLOC0); - builder.AddInstruction(VM.OpCode.DEC); - builder.AddInstruction(VM.OpCode.STLOC0); - builder.AddInstruction(VM.OpCode.LDLOC0); - builder.Jump(VM.OpCode.JMPIF, initBegin); - if (benchmarkMode == BenchmarkMode.BaseLine) - { - return builder.ToArray(); - } - builder.Push(ItemCount); - builder.AddInstruction(VM.OpCode.REVERSEN); - if (benchmarkMode == BenchmarkMode.OneGAS) - { - // just keep running until GAS is exhausted - var loopStart = new JumpTarget { _instruction = builder.AddInstruction(VM.OpCode.NOP) }; - builder.Push(ItemCount); - builder.AddInstruction(VM.OpCode.REVERSEN); - builder.Jump(VM.OpCode.JMP, loopStart); - } - - return builder.ToArray(); - } -} - -// for 0 - -// BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.4249/23H2/2023Update/SunValley3) -// Intel Core i9-14900HX, 1 CPU, 32 logical and 24 physical cores -// .NET SDK 8.0.205 -// [Host] : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2 -// DefaultJob : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2 -// -// -// | Method | ItemCount | Mean | Error | StdDev | Median | Ratio | RatioSD | -// |--------------------- |---------- |-----------------:|--------------:|---------------:|-----------------:|----------:|---------:| -// | Bench_ReverseN | 1 | 63.43 us | 0.466 us | 0.518 us | 63.45 us | 0.99 | 0.01 | -// | Bench_OneGasReverseN | 1 | 403,904.11 us | 6,492.511 us | 6,073.099 us | 402,932.40 us | 6,315.67 | 89.44 | -// | Bench_BaseLine | 1 | 63.96 us | 0.763 us | 0.714 us | 63.92 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 2 | 62.55 us | 0.988 us | 0.924 us | 62.46 us | 0.95 | 0.02 | -// | Bench_OneGasReverseN | 2 | 424,297.10 us | 8,453.137 us | 7,493.486 us | 423,912.90 us | 6,446.21 | 118.35 | -// | Bench_BaseLine | 2 | 65.83 us | 0.845 us | 0.749 us | 65.95 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 4 | 63.93 us | 0.418 us | 0.371 us | 63.89 us | 0.95 | 0.03 | -// | Bench_OneGasReverseN | 4 | 443,708.92 us | 6,689.013 us | 6,256.907 us | 444,636.60 us | 6,560.69 | 229.86 | -// | Bench_BaseLine | 4 | 67.64 us | 1.281 us | 1.524 us | 67.79 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 8 | 66.69 us | 0.757 us | 0.671 us | 66.69 us | 1.00 | 0.02 | -// | Bench_OneGasReverseN | 8 | 463,571.38 us | 6,614.687 us | 6,187.382 us | 465,568.00 us | 6,963.59 | 85.80 | -// | Bench_BaseLine | 8 | 66.64 us | 0.870 us | 0.771 us | 66.68 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 16 | 65.85 us | 0.994 us | 0.929 us | 65.61 us | 0.94 | 0.02 | -// | Bench_OneGasReverseN | 16 | 740,905.55 us | 71,090.901 us | 209,613.127 us | 653,644.75 us | 9,341.86 | 3,092.85 | -// | Bench_BaseLine | 16 | 70.08 us | 1.376 us | 1.638 us | 70.15 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 32 | 66.47 us | 0.928 us | 2.187 us | 65.77 us | 1.02 | 0.04 | -// | Bench_OneGasReverseN | 32 | 631,596.65 us | 11,060.847 us | 10,346.323 us | 629,654.10 us | 9,360.06 | 221.36 | -// | Bench_BaseLine | 32 | 67.49 us | 0.900 us | 0.842 us | 67.56 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 64 | 72.21 us | 0.921 us | 0.862 us | 72.05 us | 1.02 | 0.02 | -// | Bench_OneGasReverseN | 64 | 787,570.95 us | 6,915.746 us | 6,468.994 us | 786,778.70 us | 11,090.76 | 177.74 | -// | Bench_BaseLine | 64 | 71.02 us | 0.946 us | 0.884 us | 71.06 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 128 | 80.17 us | 0.723 us | 0.676 us | 80.19 us | 0.98 | 0.01 | -// | Bench_OneGasReverseN | 128 | 1,134,510.61 us | 14,991.714 us | 14,023.259 us | 1,133,177.90 us | 13,828.61 | 184.58 | -// | Bench_BaseLine | 128 | 81.90 us | 0.623 us | 0.553 us | 81.77 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 256 | 98.24 us | 1.140 us | 1.067 us | 98.05 us | 0.99 | 0.01 | -// | Bench_OneGasReverseN | 256 | 1,785,906.33 us | 13,785.746 us | 12,895.195 us | 1,788,819.30 us | 18,067.20 | 198.87 | -// | Bench_BaseLine | 256 | 98.85 us | 0.961 us | 0.899 us | 98.95 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 512 | 136.19 us | 1.614 us | 1.510 us | 136.34 us | 1.02 | 0.02 | -// | Bench_OneGasReverseN | 512 | 3,100,087.41 us | 16,564.249 us | 15,494.209 us | 3,097,066.60 us | 23,209.57 | 381.50 | -// | Bench_BaseLine | 512 | 133.60 us | 2.144 us | 2.006 us | 132.73 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 1024 | 207.06 us | 2.213 us | 2.070 us | 206.76 us | 1.01 | 0.01 | -// | Bench_OneGasReverseN | 1024 | 5,762,294.72 us | 20,289.404 us | 16,942.572 us | 5,764,133.80 us | 28,109.14 | 349.87 | -// | Bench_BaseLine | 1024 | 205.07 us | 2.360 us | 2.208 us | 205.07 us | 1.00 | 0.00 | -// | | | | | | | | | -// | Bench_ReverseN | 2040 | 345.09 us | 4.271 us | 3.995 us | 345.40 us | 0.97 | 0.01 | -// | Bench_OneGasReverseN | 2040 | 11,005,147.03 us | 37,306.455 us | 33,071.200 us | 11,003,479.70 us | 31,019.36 | 356.02 | -// | Bench_BaseLine | 2040 | 354.62 us | 4.623 us | 4.325 us | 353.32 us | 1.00 | 0.00 | - - - -// for StackItems that has a size of maximum stack size. -// | Method | ItemCount | Mean | Error | StdDev | -// |--------------------- |---------- |----------------:|--------------:|--------------:| -// | Bench_ReverseN | 1 | 104.0 us | 0.77 us | 0.72 us | -// | Bench_OneGasReverseN | 1 | 389,585.4 us | 4,740.18 us | 4,433.96 us | -// | Bench_ReverseN | 2 | 148.3 us | 2.25 us | 2.10 us | -// | Bench_OneGasReverseN | 2 | 417,831.5 us | 6,651.20 us | 6,221.53 us | -// | Bench_ReverseN | 4 | 231.8 us | 3.92 us | 3.67 us | -// | Bench_OneGasReverseN | 4 | 428,442.6 us | 8,034.41 us | 7,515.39 us | -// | Bench_ReverseN | 8 | 387.8 us | 5.23 us | 4.89 us | -// | Bench_OneGasReverseN | 8 | 448,046.9 us | 6,270.18 us | 5,235.89 us | -// | Bench_ReverseN | 16 | 240.0 us | 7.30 us | 21.53 us | -// | Bench_OneGasReverseN | 16 | 522,904.3 us | 7,157.93 us | 6,695.54 us | -// | Bench_ReverseN | 32 | 302.4 us | 9.53 us | 27.79 us | -// | Bench_OneGasReverseN | 32 | 626,536.6 us | 6,629.69 us | 6,201.42 us | -// | Bench_ReverseN | 64 | 1,728.3 us | 34.27 us | 58.19 us | -// | Bench_OneGasReverseN | 64 | 827,284.5 us | 15,943.00 us | 14,913.09 us | -// | Bench_ReverseN | 128 | 3,704.5 us | 73.98 us | 175.82 us | -// | Bench_OneGasReverseN | 128 | 1,125,104.6 us | 10,629.65 us | 9,942.98 us | -// | Bench_ReverseN | 256 | 6,381.1 us | 127.42 us | 290.21 us | -// | Bench_OneGasReverseN | 256 | 1,804,355.7 us | 9,690.50 us | 8,590.37 us | -// | Bench_ReverseN | 512 | 9,485.9 us | 184.52 us | 492.52 us | -// | Bench_OneGasReverseN | 512 | 3,159,411.1 us | 28,901.54 us | 27,034.52 us | -// | Bench_ReverseN | 1024 | 14,125.6 us | 282.51 us | 577.08 us | -// | Bench_OneGasReverseN | 1024 | 5,799,154.5 us | 33,817.93 us | 31,633.31 us | -// | Bench_ReverseN | 2040 | 22,868.0 us | 449.84 us | 929.00 us | -// | Bench_OneGasReverseN | 2040 | 11,100,853.9 us | 159,980.97 us | 141,818.97 us | diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SETITEM.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SETITEM.cs new file mode 100644 index 0000000000..9195738904 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SETITEM.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SETITEM.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SETITEM : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SIZE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SIZE.cs new file mode 100644 index 0000000000..16910f91a5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.SIZE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SIZE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SIZE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.UNPACK.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.UNPACK.cs new file mode 100644 index 0000000000..c9ad90123b --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.UNPACK.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.UNPACK.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_UNPACK : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.VALUES.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.VALUES.cs new file mode 100644 index 0000000000..98a1856258 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.VALUES.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.VALUES.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_VALUES : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.AND.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.AND.cs new file mode 100644 index 0000000000..9eeaf657bb --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.AND.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.AND.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_AND : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.EQUAL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.EQUAL.cs new file mode 100644 index 0000000000..b1154a0385 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.EQUAL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.EQUAL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_EQUAL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.INVERT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.INVERT.cs new file mode 100644 index 0000000000..dc98a7ace3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.INVERT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.INVERT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_INVERT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.NOTEQUAL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.NOTEQUAL.cs new file mode 100644 index 0000000000..167ca10bf4 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.NOTEQUAL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NOTEQUAL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NOTEQUAL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.OR.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.OR.cs new file mode 100644 index 0000000000..be5611be28 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.OR.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.OR.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_OR : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.XOR.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.XOR.cs new file mode 100644 index 0000000000..79263447f0 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/BitwiseLogic/OpCode.XOR.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.XOR.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_XOR : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORT.cs new file mode 100644 index 0000000000..d0235a0901 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ABORT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ABORT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORTMSG.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORTMSG.cs new file mode 100644 index 0000000000..3139bab38c --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ABORTMSG.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ABORTMSG.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ABORTMSG : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERT.cs new file mode 100644 index 0000000000..1b4521edb8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ASSERT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ASSERT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERTMSG.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERTMSG.cs new file mode 100644 index 0000000000..0c62a894e3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.ASSERTMSG.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ASSERTMSG.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ASSERTMSG : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALL.cs new file mode 100644 index 0000000000..ea78285865 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CALL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CALL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLA.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLA.cs new file mode 100644 index 0000000000..32a25373df --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLA.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CALLA.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CALLA : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLUL.cs new file mode 100644 index 0000000000..93c0545dee --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.CALLUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CALLUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CALLUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMP.cs new file mode 100644 index 0000000000..31ad240c66 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQ.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQ.cs new file mode 100644 index 0000000000..b636e562b3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQ.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPEQ.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPEQ : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQUL.cs new file mode 100644 index 0000000000..49c1de5d84 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPEQUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPEQUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPEQUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGE.cs new file mode 100644 index 0000000000..38b48ae237 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPGE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPGE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGEUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGEUL.cs new file mode 100644 index 0000000000..0dffdf876c --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGEUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPGEUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPGEUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGT.cs new file mode 100644 index 0000000000..34e80efa26 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPGT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPGT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGTUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGTUL.cs new file mode 100644 index 0000000000..e6b82dfcbc --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPGTUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPGTUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPGTUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIF.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIF.cs new file mode 100644 index 0000000000..7043447128 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIF.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPIF.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPIF : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOT.cs new file mode 100644 index 0000000000..df5a455a40 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPIFNOT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPIFNOT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOTUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOTUL.cs new file mode 100644 index 0000000000..875ae69e6e --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFNOTUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPIFNOTUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPIFNOTUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFUL.cs new file mode 100644 index 0000000000..ace80f66e3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPIFUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPIFUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPIFUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLE.cs new file mode 100644 index 0000000000..a301582c90 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPLE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPLE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLEUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLEUL.cs new file mode 100644 index 0000000000..77c2540395 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLEUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPLEUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPLEUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLT.cs new file mode 100644 index 0000000000..4e1eeca625 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPLT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPLT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLTUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLTUL.cs new file mode 100644 index 0000000000..4557cbe814 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPLTUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPLTUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPLTUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNE.cs new file mode 100644 index 0000000000..cb9a8e21c1 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPNE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPNE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNEUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNEUL.cs new file mode 100644 index 0000000000..662ba5046b --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPNEUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPNEUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPNEUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPUL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPUL.cs new file mode 100644 index 0000000000..7ccbab0ab7 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.JMPUL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.JMPUL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_JMPUL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.NOP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.NOP.cs new file mode 100644 index 0000000000..8520c0f261 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.NOP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NOP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NOP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.RET.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.RET.cs new file mode 100644 index 0000000000..16466308ed --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.RET.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.RET.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_RET : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.SYSCALL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.SYSCALL.cs new file mode 100644 index 0000000000..f880a2b044 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.SYSCALL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SYSCALL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SYSCALL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.THROW.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.THROW.cs new file mode 100644 index 0000000000..41e3a709ae --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.THROW.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.THROW.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_THROW : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCH.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCH.cs new file mode 100644 index 0000000000..692837955d --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCH.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCH.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCH : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY.cs new file mode 100644 index 0000000000..f7bb368e5b --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY10.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY10.cs new file mode 100644 index 0000000000..0ad001813d --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY10.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY10.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY10 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY2.cs new file mode 100644 index 0000000000..9b8da276fa --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY3.cs new file mode 100644 index 0000000000..0bd7646429 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY4.cs new file mode 100644 index 0000000000..f64733c601 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY5.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY5.cs new file mode 100644 index 0000000000..0b1276a9d8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY5.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY5.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY5 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY6.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY6.cs new file mode 100644 index 0000000000..3fb64038d1 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY6.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY6.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY6 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY7.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY7.cs new file mode 100644 index 0000000000..1f551eb77c --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY7.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY7.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY7 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY8.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY8.cs new file mode 100644 index 0000000000..862d51b3f2 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY8.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY8.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY8 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY9.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY9.cs new file mode 100644 index 0000000000..718a390708 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUCATCHUFINALLY9.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUCATCHUFINALLY9.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUCATCHUFINALLY9 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUFINALLY.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUFINALLY.cs new file mode 100644 index 0000000000..b5caff3aa0 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Control/OpCode.TRYUFINALLY.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TRYUFINALLY.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TRYUFINALLY : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHA.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHA.cs new file mode 100644 index 0000000000..2b60894073 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHA.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHA.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHA : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA1.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA1.cs new file mode 100644 index 0000000000..55cd9b7377 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA1.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHDATA1.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHDATA1 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA2.cs new file mode 100644 index 0000000000..16ba3264a3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHDATA2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHDATA2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA4.cs new file mode 100644 index 0000000000..46119d89b9 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHDATA4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHDATA4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHDATA4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHINT8UtoUPUSHINT256.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHINT8UtoUPUSHINT256.cs new file mode 100644 index 0000000000..ccd70c32af --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHINT8UtoUPUSHINT256.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHINT8UtoUPUSHINT256.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHINT8UtoUPUSHINT256 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHM1UtoUPUSH16.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHM1UtoUPUSH16.cs new file mode 100644 index 0000000000..813737c49b --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHM1UtoUPUSH16.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHM1UtoUPUSH16.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHM1UtoUPUSH16 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHNULL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHNULL.cs new file mode 100644 index 0000000000..16a5bbaf02 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Push/OpCode.PUSHNULL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PUSHNULL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PUSHNULL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSLOT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSLOT.cs new file mode 100644 index 0000000000..547132ba4d --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSLOT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.INITSLOT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_INITSLOT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSSLOT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSSLOT.cs new file mode 100644 index 0000000000..86e08a88af --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.INITSSLOT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.INITSSLOT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_INITSSLOT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG.cs new file mode 100644 index 0000000000..4cf1611eb5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG0.cs new file mode 100644 index 0000000000..6b4c980bfa --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG1.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG1.cs new file mode 100644 index 0000000000..6bf1ea2f89 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG1.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG1.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG1 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG2.cs new file mode 100644 index 0000000000..fa526cab69 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG3.cs new file mode 100644 index 0000000000..8e6be2cdaa --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG4.cs new file mode 100644 index 0000000000..83b3edc645 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG5.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG5.cs new file mode 100644 index 0000000000..105ca65281 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG5.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG5.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG5 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG6.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG6.cs new file mode 100644 index 0000000000..30350b61ee --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDARG6.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDARG6.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDARG6 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC.cs new file mode 100644 index 0000000000..941e8913d0 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC0.cs new file mode 100644 index 0000000000..5f8ec0b3bf --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC1.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC1.cs new file mode 100644 index 0000000000..0eccc99a72 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC1.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC1.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC1 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC2.cs new file mode 100644 index 0000000000..6cd5e20014 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC3.cs new file mode 100644 index 0000000000..f0f4c3f8a0 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC4.cs new file mode 100644 index 0000000000..fe9ecb0884 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC5.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC5.cs new file mode 100644 index 0000000000..3f346487e4 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC5.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC5.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC5 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC6.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC6.cs new file mode 100644 index 0000000000..44d598c00a --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDLOC6.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDLOC6.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDLOC6 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD.cs new file mode 100644 index 0000000000..5af3e60bb8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD0.cs new file mode 100644 index 0000000000..dbf76a7d21 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD1.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD1.cs new file mode 100644 index 0000000000..8bc6dac167 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD1.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD1.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD1 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD2.cs new file mode 100644 index 0000000000..dd74896ec4 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD3.cs new file mode 100644 index 0000000000..992ca044b1 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD4.cs new file mode 100644 index 0000000000..4abb247bdc --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD5.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD5.cs new file mode 100644 index 0000000000..7170a97b1a --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD5.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD5.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD5 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD6.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD6.cs new file mode 100644 index 0000000000..45c58538b8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.LDSFLD6.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LDSFLD6.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LDSFLD6 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG.cs new file mode 100644 index 0000000000..e46e1e5896 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG0.cs new file mode 100644 index 0000000000..ce464ce6ce --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG1.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG1.cs new file mode 100644 index 0000000000..40aad829e3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG1.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG1.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG1 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG2.cs new file mode 100644 index 0000000000..b1fa989be9 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG3.cs new file mode 100644 index 0000000000..eaf4411cf8 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG4.cs new file mode 100644 index 0000000000..465ab73e84 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG5.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG5.cs new file mode 100644 index 0000000000..9ac515a5c5 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG5.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG5.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG5 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG6.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG6.cs new file mode 100644 index 0000000000..c470e32d5c --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STARG6.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STARG6.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STARG6 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STLOC.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STLOC.cs new file mode 100644 index 0000000000..10ac1ad8fc --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STLOC.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STLOC.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STLOC : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD.cs new file mode 100644 index 0000000000..79e8825325 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD0.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD0.cs new file mode 100644 index 0000000000..6c08ffa3af --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD0.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD0.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD0 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD1.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD1.cs new file mode 100644 index 0000000000..5270f301e9 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD1.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD1.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD1 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD2.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD2.cs new file mode 100644 index 0000000000..5d093565cd --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD2.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD2.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD2 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD3.cs new file mode 100644 index 0000000000..385f4529b7 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD4.cs new file mode 100644 index 0000000000..146213adb3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD5.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD5.cs new file mode 100644 index 0000000000..4c22a37d6f --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD5.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD5.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD5 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD6.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD6.cs new file mode 100644 index 0000000000..84db24a255 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Slot/OpCode.STSFLD6.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.STSFLD6.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_STSFLD6 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.CAT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.CAT.cs new file mode 100644 index 0000000000..a2314a89e6 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.CAT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CAT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CAT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.LEFT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.LEFT.cs new file mode 100644 index 0000000000..218ee9cf3d --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.LEFT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.LEFT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_LEFT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.MEMCPY.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.MEMCPY.cs new file mode 100644 index 0000000000..c0d0360a5e --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.MEMCPY.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.MEMCPY.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_MEMCPY : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.NEWBUFFER.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.NEWBUFFER.cs new file mode 100644 index 0000000000..a537b49707 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.NEWBUFFER.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NEWBUFFER.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NEWBUFFER : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.RIGHT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.RIGHT.cs new file mode 100644 index 0000000000..f569f0eac6 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.RIGHT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.RIGHT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_RIGHT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.SUBSTR.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.SUBSTR.cs new file mode 100644 index 0000000000..384991c904 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Splice/OpCode.SUBSTR.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SUBSTR.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SUBSTR : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.CLEAR.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.CLEAR.cs new file mode 100644 index 0000000000..60fb3c0aa2 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.CLEAR.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CLEAR.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CLEAR : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DEPTH.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DEPTH.cs new file mode 100644 index 0000000000..bb9eac4324 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DEPTH.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.DEPTH.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_DEPTH : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DROP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DROP.cs new file mode 100644 index 0000000000..7ed8e24939 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.DROP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.DROP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_DROP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.NIP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.NIP.cs new file mode 100644 index 0000000000..ec04c15eb3 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.NIP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.NIP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_NIP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.OVER.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.OVER.cs new file mode 100644 index 0000000000..2c7f83e3a1 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.OVER.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.OVER.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_OVER : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.PICK.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.PICK.cs new file mode 100644 index 0000000000..fb11636cae --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.PICK.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.PICK.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_PICK : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE3.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE3.cs new file mode 100644 index 0000000000..acc4bcc3ed --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE3.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.REVERSE3.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_REVERSE3 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE4.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE4.cs new file mode 100644 index 0000000000..d13152635b --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSE4.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.REVERSE4.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_REVERSE4 : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSEN.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSEN.cs new file mode 100644 index 0000000000..b128d63d80 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.REVERSEN.cs @@ -0,0 +1,47 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.REVERSEN.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_REVERSEN : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + var initBegin = new JumpTarget(); + builder.AddInstruction(new Instruction { _opCode = VM.OpCode.INITSLOT, _operand = [1, 0] }); + builder.Push(ItemCount); + builder.AddInstruction(VM.OpCode.STLOC0); + initBegin._instruction = builder.AddInstruction(VM.OpCode.NOP); + builder.Push(0); + builder.AddInstruction(VM.OpCode.LDLOC0); + builder.AddInstruction(VM.OpCode.DEC); + builder.AddInstruction(VM.OpCode.STLOC0); + builder.AddInstruction(VM.OpCode.LDLOC0); + builder.Jump(VM.OpCode.JMPIF, initBegin); + if (benchmarkMode == BenchmarkMode.BaseLine) + { + return builder.ToArray(); + } + builder.Push(ItemCount); + builder.AddInstruction(VM.OpCode.REVERSEN); + if (benchmarkMode == BenchmarkMode.OneGAS) + { + // just keep running until GAS is exhausted + var loopStart = new JumpTarget { _instruction = builder.AddInstruction(VM.OpCode.NOP) }; + builder.Push(ItemCount); + builder.AddInstruction(VM.OpCode.REVERSEN); + builder.Jump(VM.OpCode.JMP, loopStart); + } + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROLL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROLL.cs new file mode 100644 index 0000000000..a1be3ab08c --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROLL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ROLL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ROLL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROT.cs new file mode 100644 index 0000000000..63c9a0172c --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.ROT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ROT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ROT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.SWAP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.SWAP.cs new file mode 100644 index 0000000000..6ce559e6eb --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.SWAP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.SWAP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_SWAP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.TUCK.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.TUCK.cs new file mode 100644 index 0000000000..6476665d10 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.TUCK.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.TUCK.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_TUCK : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.XDROP.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.XDROP.cs new file mode 100644 index 0000000000..8564d9c958 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Stack/OpCode.XDROP.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.XDROP.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_XDROP : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.CONVERT.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.CONVERT.cs new file mode 100644 index 0000000000..b57de9d659 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.CONVERT.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.CONVERT.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_CONVERT : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISNULL.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISNULL.cs new file mode 100644 index 0000000000..aec3c87be4 --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISNULL.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ISNULL.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ISNULL : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISTYPE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISTYPE.cs new file mode 100644 index 0000000000..54805f2d9e --- /dev/null +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Types/OpCode.ISTYPE.cs @@ -0,0 +1,22 @@ +// Copyright (C) 2015-2024 The Neo Project. +// +// OpCode.ISTYPE.cs file belongs to the neo project and is free +// software distributed under the MIT software license, see the +// accompanying file LICENSE in the main directory of the +// repository or http://www.opensource.org/licenses/mit-license.php +// for more details. +// +// Redistribution and use in source and binary forms with or without +// modifications are permitted. + +namespace Neo.VM.Benchmark.OpCode; + +public class OpCode_ISTYPE : OpCodeBase +{ + protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + { + var builder = new InstructionBuilder(); + + return builder.ToArray(); + } +} From ee45e63f422896d62e593716e950b4e88bcf6d84 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Sun, 13 Oct 2024 09:44:55 +0800 Subject: [PATCH 02/32] fill some bench and result --- .../Neo.VM.Benchmarks/Benchmarks.POC.cs | 724 ++++++------- .../InstructionBuilder/InstructionBuilder.cs | 2 +- .../OpCode/Arithmetic/OpCode.GE.cs | 60 +- .../OpCode/Arithmetic/OpCode.GT.cs | 133 ++- .../OpCode/Arithmetic/OpCode.LE.cs | 137 ++- .../OpCode/Arithmetic/OpCode.LT.cs | 139 ++- .../OpCode/Arithmetic/OpCode.MODMUL.cs | 950 +++++++++++++++++- .../OpCode/Arithmetic/OpCode.MODPOW.cs | 77 +- .../OpCode/Arithmetic/OpCode.NOT.cs | 16 +- .../OpCode/Arithmetic/OpCode.NUMEQUAL.cs | 16 +- .../OpCode/Arithmetic/OpCode.NUMNOTEQUAL.cs | 16 +- .../OpCode/Arithmetic/OpCode.POW.cs | 136 ++- .../OpCode/Arithmetic/OpCode.SHL.cs | 261 ++++- .../OpCode/Arithmetic/OpCode.SHR.cs | 255 ++++- .../OpCode/Arithmetic/OpCode.SIGN.cs | 56 +- .../OpCode/Arithmetic/OpCode.SQRT.cs | 62 +- .../OpCode/Arrays/OpCode.APPEND.cs | 30 +- .../OpCode/Arrays/OpCode.CLEARITEMS.cs | 49 +- .../OpCode/Arrays/OpCode.HASKEY.cs | 16 +- .../OpCode/Arrays/OpCode.KEYS.cs | 16 +- .../OpCode/Arrays/OpCode.NEWARRAY.cs | 16 +- .../OpCode/Arrays/OpCode.NEWARRAY0.cs | 16 +- .../OpCode/Arrays/OpCode.NEWARRAYUT.cs | 38 +- .../OpCode/Arrays/OpCode.NEWMAP.cs | 22 +- .../OpCode/Arrays/OpCode.NEWSTRUCT.cs | 24 +- .../OpCode/Arrays/OpCode.NEWSTRUCT0.cs | 16 +- .../OpCode/Arrays/OpCode.PACK.cs | 44 +- .../OpCode/Arrays/OpCode.PACKMAP.cs | 48 +- .../OpCode/Arrays/OpCode.PACKSTRUCT.cs | 47 +- .../OpCode/Arrays/OpCode.PICKITEM.cs | 16 +- .../OpCode/Arrays/OpCode.REMOVE.cs | 79 +- .../OpCode/Arrays/OpCode.REVERSEITEMS.cs | 48 +- .../OpCode/Arrays/OpCode.SETITEM.cs | 16 +- .../OpCode/Arrays/OpCode.SIZE.cs | 16 +- .../OpCode/Arrays/OpCode.UNPACK.cs | 48 +- .../OpCode/Arrays/OpCode.VALUES.cs | 48 +- .../OpCode/Benchmark.Opcode.cs | 20 + .../OpCode/BenchmarkEngine.cs | 22 +- .../OpCode/BitwiseLogic/OpCode.AND.cs | 16 +- .../OpCode/BitwiseLogic/OpCode.EQUAL.cs | 16 +- .../OpCode/BitwiseLogic/OpCode.INVERT.cs | 16 +- .../OpCode/BitwiseLogic/OpCode.NOTEQUAL.cs | 16 +- .../OpCode/BitwiseLogic/OpCode.OR.cs | 16 +- .../OpCode/BitwiseLogic/OpCode.XOR.cs | 16 +- .../OpCode/Control/OpCode.ABORT.cs | 16 +- .../OpCode/Control/OpCode.ABORTMSG.cs | 16 +- .../OpCode/Control/OpCode.ASSERT.cs | 16 +- .../OpCode/Control/OpCode.ASSERTMSG.cs | 16 +- .../OpCode/Control/OpCode.CALL.cs | 16 +- .../OpCode/Control/OpCode.CALLA.cs | 16 +- .../OpCode/Control/OpCode.CALLUL.cs | 16 +- .../OpCode/Control/OpCode.JMP.cs | 16 +- .../OpCode/Control/OpCode.JMPEQ.cs | 16 +- .../OpCode/Control/OpCode.JMPEQUL.cs | 16 +- .../OpCode/Control/OpCode.JMPGE.cs | 16 +- .../OpCode/Control/OpCode.JMPGEUL.cs | 16 +- .../OpCode/Control/OpCode.JMPGT.cs | 16 +- .../OpCode/Control/OpCode.JMPGTUL.cs | 16 +- .../OpCode/Control/OpCode.JMPIF.cs | 16 +- .../OpCode/Control/OpCode.JMPIFNOT.cs | 16 +- .../OpCode/Control/OpCode.JMPIFNOTUL.cs | 16 +- .../OpCode/Control/OpCode.JMPIFUL.cs | 16 +- .../OpCode/Control/OpCode.JMPLE.cs | 16 +- .../OpCode/Control/OpCode.JMPLEUL.cs | 16 +- .../OpCode/Control/OpCode.JMPLT.cs | 16 +- .../OpCode/Control/OpCode.JMPLTUL.cs | 16 +- .../OpCode/Control/OpCode.JMPNE.cs | 16 +- .../OpCode/Control/OpCode.JMPNEUL.cs | 16 +- .../OpCode/Control/OpCode.JMPUL.cs | 16 +- .../OpCode/Control/OpCode.NOP.cs | 16 +- .../OpCode/Control/OpCode.RET.cs | 16 +- .../OpCode/Control/OpCode.SYSCALL.cs | 16 +- .../OpCode/Control/OpCode.THROW.cs | 16 +- .../OpCode/Control/OpCode.TRYUCATCH.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY10.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY2.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY3.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY4.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY5.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY6.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY7.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY8.cs | 16 +- .../Control/OpCode.TRYUCATCHUFINALLY9.cs | 16 +- .../OpCode/Control/OpCode.TRYUFINALLY.cs | 16 +- .../Neo.VM.Benchmarks/OpCode/GenerateTests.cs | 17 + .../Neo.VM.Benchmarks/OpCode/OpCodeBase.cs | 45 +- .../OpCode/Push/OpCode.PUSHA.cs | 16 +- .../OpCode/Push/OpCode.PUSHDATA1.cs | 16 +- .../OpCode/Push/OpCode.PUSHDATA2.cs | 16 +- .../OpCode/Push/OpCode.PUSHDATA4.cs | 16 +- .../Push/OpCode.PUSHINT8UtoUPUSHINT256.cs | 16 +- .../OpCode/Push/OpCode.PUSHM1UtoUPUSH16.cs | 16 +- .../OpCode/Push/OpCode.PUSHNULL.cs | 16 +- .../OpCode/Slot/OpCode.INITSLOT.cs | 16 +- .../OpCode/Slot/OpCode.INITSSLOT.cs | 16 +- .../OpCode/Slot/OpCode.LDARG.cs | 16 +- .../OpCode/Slot/OpCode.LDARG0.cs | 16 +- .../OpCode/Slot/OpCode.LDARG1.cs | 16 +- .../OpCode/Slot/OpCode.LDARG2.cs | 16 +- .../OpCode/Slot/OpCode.LDARG3.cs | 16 +- .../OpCode/Slot/OpCode.LDARG4.cs | 16 +- .../OpCode/Slot/OpCode.LDARG5.cs | 16 +- .../OpCode/Slot/OpCode.LDARG6.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC0.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC1.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC2.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC3.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC4.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC5.cs | 16 +- .../OpCode/Slot/OpCode.LDLOC6.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD0.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD1.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD2.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD3.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD4.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD5.cs | 16 +- .../OpCode/Slot/OpCode.LDSFLD6.cs | 16 +- .../OpCode/Slot/OpCode.STARG.cs | 16 +- .../OpCode/Slot/OpCode.STARG0.cs | 16 +- .../OpCode/Slot/OpCode.STARG1.cs | 16 +- .../OpCode/Slot/OpCode.STARG2.cs | 16 +- .../OpCode/Slot/OpCode.STARG3.cs | 16 +- .../OpCode/Slot/OpCode.STARG4.cs | 16 +- .../OpCode/Slot/OpCode.STARG5.cs | 16 +- .../OpCode/Slot/OpCode.STARG6.cs | 16 +- .../OpCode/Slot/OpCode.STLOC.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD0.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD1.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD2.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD3.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD4.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD5.cs | 16 +- .../OpCode/Slot/OpCode.STSFLD6.cs | 16 +- .../OpCode/Splice/OpCode.CAT.cs | 16 +- .../OpCode/Splice/OpCode.LEFT.cs | 16 +- .../OpCode/Splice/OpCode.MEMCPY.cs | 59 +- .../OpCode/Splice/OpCode.NEWBUFFER.cs | 43 +- .../OpCode/Splice/OpCode.RIGHT.cs | 16 +- .../OpCode/Splice/OpCode.SUBSTR.cs | 16 +- .../OpCode/Stack/OpCode.CLEAR.cs | 16 +- .../OpCode/Stack/OpCode.DEPTH.cs | 16 +- .../OpCode/Stack/OpCode.DROP.cs | 16 +- .../OpCode/Stack/OpCode.NIP.cs | 16 +- .../OpCode/Stack/OpCode.OVER.cs | 16 +- .../OpCode/Stack/OpCode.PICK.cs | 16 +- .../OpCode/Stack/OpCode.REVERSE3.cs | 16 +- .../OpCode/Stack/OpCode.REVERSE4.cs | 16 +- .../OpCode/Stack/OpCode.REVERSEN.cs | 35 +- .../OpCode/Stack/OpCode.ROLL.cs | 16 +- .../OpCode/Stack/OpCode.ROT.cs | 16 +- .../OpCode/Stack/OpCode.SWAP.cs | 16 +- .../OpCode/Stack/OpCode.TUCK.cs | 16 +- .../OpCode/Stack/OpCode.XDROP.cs | 16 +- .../OpCode/Types/OpCode.CONVERT.cs | 16 +- .../OpCode/Types/OpCode.ISNULL.cs | 16 +- .../OpCode/Types/OpCode.ISTYPE.cs | 16 +- benchmarks/Neo.VM.Benchmarks/Program.cs | 59 +- 161 files changed, 5286 insertions(+), 579 deletions(-) create mode 100644 benchmarks/Neo.VM.Benchmarks/OpCode/GenerateTests.cs diff --git a/benchmarks/Neo.VM.Benchmarks/Benchmarks.POC.cs b/benchmarks/Neo.VM.Benchmarks/Benchmarks.POC.cs index 2eede59fc3..4106f39510 100644 --- a/benchmarks/Neo.VM.Benchmarks/Benchmarks.POC.cs +++ b/benchmarks/Neo.VM.Benchmarks/Benchmarks.POC.cs @@ -10,296 +10,297 @@ // modifications are permitted. using BenchmarkDotNet.Attributes; +using Neo.VM.Benchmark.OpCode; using System.Diagnostics; namespace Neo.VM.Benchmark { public class Benchmarks_PoCs { - [Benchmark] - public void NeoIssue2528() - { - // https://github.com/neo-project/neo/issues/2528 - // L01: INITSLOT 1, 0 - // L02: NEWARRAY0 - // L03: DUP - // L04: DUP - // L05: PUSHINT16 2043 - // L06: STLOC 0 - // L07: PUSH1 - // L08: PACK - // L09: LDLOC 0 - // L10: DEC - // L11: STLOC 0 - // L12: LDLOC 0 - // L13: JMPIF_L L07 - // L14: PUSH1 - // L15: PACK - // L16: APPEND - // L17: PUSHINT32 38000 - // L18: STLOC 0 - // L19: PUSH0 - // L20: PICKITEM - // L21: LDLOC 0 - // L22: DEC - // L23: STLOC 0 - // L24: LDLOC 0 - // L25: JMPIF_L L19 - // L26: DROP - Run("VwEAwkpKAfsHdwARwG8AnXcAbwAl9////xHAzwJwlAAAdwAQzm8AnXcAbwAl9////0U="); - } - - [Benchmark] - public void NeoVMIssue418() - { - // https://github.com/neo-project/neo-vm/issues/418 - // L00: NEWARRAY0 - // L01: PUSH0 - // L02: PICK - // L03: PUSH1 - // L04: PACK - // L05: PUSH1 - // L06: PICK - // L07: PUSH1 - // L08: PACK - // L09: INITSSLOT 1 - // L10: PUSHINT16 510 - // L11: DEC - // L12: STSFLD0 - // L13: PUSH1 - // L14: PICK - // L15: PUSH1 - // L16: PICK - // L17: PUSH2 - // L18: PACK - // L19: REVERSE3 - // L20: PUSH2 - // L21: PACK - // L22: LDSFLD0 - // L23: DUP - // L24: JMPIF L11 - // L25: DROP - // L26: ROT - // L27: DROP - Run("whBNEcARTRHAVgEB/gGdYBFNEU0SwFMSwFhKJPNFUUU="); - } - - [Benchmark] - public void NeoIssue2723() - { - // L00: INITSSLOT 1 - // L01: PUSHINT32 130000 - // L02: STSFLD 0 - // L03: PUSHINT32 1048576 - // L04: NEWBUFFER - // L05: DROP - // L06: LDSFLD 0 - // L07: DEC - // L08: DUP - // L09: STSFLD 0 - // L10: JMPIF L03 - Run("VgEC0PsBAGcAAgAAEACIRV8AnUpnACTz"); - } - - // Below are PoCs from issue https://github.com/neo-project/neo/issues/2723 by @dusmart - [Benchmark] - public void PoC_NewBuffer() - { - // INITSLOT 0100 - // PUSHINT32 23000000 - // STLOC 00 - // PUSHINT32 1048576 - // NEWBUFFER - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f2ffffff - // CLEAR - // RET - Run("VwEAAsDzXgF3AAIAABAAiEVvAJ13AG8AJfL///9JQA=="); - } - - [Benchmark] - public void PoC_Cat() - { - // INITSLOT 0100 - // PUSHINT32 1048575 - // NEWBUFFER - // PUSH1 - // NEWBUFFER - // PUSHINT32 133333337 - // STLOC 00 - // OVER - // OVER - // CAT - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f5ffffff - // CLEAR - // RET - Run("VwEAAv//DwCIEYgCWYHyB3cAS0uLRW8AnXcAbwAl9f///0lA"); - } - - [Benchmark] - public void PoC_Left() - { - // INITSLOT 0100 - // PUSHINT32 1048576 - // NEWBUFFER - // PUSHINT32 133333337 - // STLOC 00 - // DUP - // PUSHINT32 1048576 - // LEFT - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f1ffffff - // CLEAR - // RET - Run("VwEAAgAAEACIAlmB8gd3AEoCAAAQAI1FbwCddwBvACXx////SUA="); - } - - [Benchmark] - public void PoC_Right() - { - // INITSLOT 0100 - // PUSHINT32 1048576 - // NEWBUFFER - // PUSHINT32 133333337 - // STLOC 00 - // DUP - // PUSHINT32 1048576 - // RIGHT - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f1ffffff - // CLEAR - // RET - Run("VwEAAgAAEACIAlmB8gd3AEoCAAAQAI5FbwCddwBvACXx////SUA="); - } - - [Benchmark] - public void PoC_ReverseN() - { - // INITSLOT 0100 - // PUSHINT16 2040 - // STLOC 00 - // PUSHDATA1 aaabbbbbbbbbcccccccdddddddeeeeeeefffffff - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L cfffffff - // PUSHINT32 23000000 - // STLOC 00 - // PUSHINT16 2040 - // REVERSEN - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f5ffffff - // CLEAR - // RET - Run("VwEAAfgHdwAMKGFhYWJiYmJiYmJiYmNjY2NjY2NkZGRkZGRkZWVlZWVlZWZmZmZmZmZvAJ13AG8AJc////8CwPNeAXcAAfgHVW8AnXcAbwAl9f///0lA"); - } - - [Benchmark] - public void PoC_Substr() - { - // INITSLOT 0100 - // PUSHINT32 1048576 - // NEWBUFFER - // PUSHINT32 133333337 - // STLOC 00 - // DUP - // PUSH0 - // PUSHINT32 1048576 - // SUBSTR - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f0ffffff - // CLEAR - // RET - Run("VwEAAgAAEACIAlmB8gd3AEoQAgAAEACMRW8AnXcAbwAl8P///0lA"); - } - - [Benchmark] - public void PoC_NewArray() - { - // INITSLOT 0100 - // PUSHINT32 1333333337 - // STLOC 00 - // PUSHINT16 2040 - // NEWARRAY - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f4ffffff - // RET - Run("VwEAAlkNeU93AAH4B8NFbwCddwBvACX0////QA=="); - } - - [Benchmark] - public void PoC_NewStruct() - { - // INITSLOT 0100 - // PUSHINT32 1333333337 - // STLOC 00 - // PUSHINT16 2040 - // NEWSTRUCT - // DROP - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f4ffffff - // RET - Run("VwEAAlkNeU93AAH4B8ZFbwCddwBvACX0////QA=="); - } - - [Benchmark] - public void PoC_Roll() - { - // INITSLOT 0100 - // PUSHINT16 2040 - // STLOC 00 - // PUSHDATA1 aaabbbbbbbbbcccccccdddddddeeeeeeefffffff - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L cfffffff - // PUSHINT32 23000000 - // STLOC 00 - // PUSHINT16 2039 - // ROLL - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f5ffffff - // CLEAR - // RET - Run("VwEAAfgHdwAMKGFhYWJiYmJiYmJiYmNjY2NjY2NkZGRkZGRkZWVlZWVlZWZmZmZmZmZvAJ13AG8AJc////8CwPNeAXcAAfcHUm8AnXcAbwAl9f///0lA"); - } - + // [Benchmark] + // public void NeoIssue2528() + // { + // // https://github.com/neo-project/neo/issues/2528 + // // L01: INITSLOT 1, 0 + // // L02: NEWARRAY0 + // // L03: DUP + // // L04: DUP + // // L05: PUSHINT16 2043 + // // L06: STLOC 0 + // // L07: PUSH1 + // // L08: PACK + // // L09: LDLOC 0 + // // L10: DEC + // // L11: STLOC 0 + // // L12: LDLOC 0 + // // L13: JMPIF_L L07 + // // L14: PUSH1 + // // L15: PACK + // // L16: APPEND + // // L17: PUSHINT32 38000 + // // L18: STLOC 0 + // // L19: PUSH0 + // // L20: PICKITEM + // // L21: LDLOC 0 + // // L22: DEC + // // L23: STLOC 0 + // // L24: LDLOC 0 + // // L25: JMPIF_L L19 + // // L26: DROP + // Run("VwEAwkpKAfsHdwARwG8AnXcAbwAl9////xHAzwJwlAAAdwAQzm8AnXcAbwAl9////0U="); + // } + // + // [Benchmark] + // public void NeoVMIssue418() + // { + // // https://github.com/neo-project/neo-vm/issues/418 + // // L00: NEWARRAY0 + // // L01: PUSH0 + // // L02: PICK + // // L03: PUSH1 + // // L04: PACK + // // L05: PUSH1 + // // L06: PICK + // // L07: PUSH1 + // // L08: PACK + // // L09: INITSSLOT 1 + // // L10: PUSHINT16 510 + // // L11: DEC + // // L12: STSFLD0 + // // L13: PUSH1 + // // L14: PICK + // // L15: PUSH1 + // // L16: PICK + // // L17: PUSH2 + // // L18: PACK + // // L19: REVERSE3 + // // L20: PUSH2 + // // L21: PACK + // // L22: LDSFLD0 + // // L23: DUP + // // L24: JMPIF L11 + // // L25: DROP + // // L26: ROT + // // L27: DROP + // Run("whBNEcARTRHAVgEB/gGdYBFNEU0SwFMSwFhKJPNFUUU="); + // } + // + // [Benchmark] + // public void NeoIssue2723() + // { + // // L00: INITSSLOT 1 + // // L01: PUSHINT32 130000 + // // L02: STSFLD 0 + // // L03: PUSHINT32 1048576 + // // L04: NEWBUFFER + // // L05: DROP + // // L06: LDSFLD 0 + // // L07: DEC + // // L08: DUP + // // L09: STSFLD 0 + // // L10: JMPIF L03 + // Run("VgEC0PsBAGcAAgAAEACIRV8AnUpnACTz"); + // } + // + // // Below are PoCs from issue https://github.com/neo-project/neo/issues/2723 by @dusmart + // [Benchmark] + // public void PoC_NewBuffer() + // { + // // INITSLOT 0100 + // // PUSHINT32 23000000 + // // STLOC 00 + // // PUSHINT32 1048576 + // // NEWBUFFER + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f2ffffff + // // CLEAR + // // RET + // Run("VwEAAsDzXgF3AAIAABAAiEVvAJ13AG8AJfL///9JQA=="); + // } + // + // [Benchmark] + // public void PoC_Cat() + // { + // // INITSLOT 0100 + // // PUSHINT32 1048575 + // // NEWBUFFER + // // PUSH1 + // // NEWBUFFER + // // PUSHINT32 133333337 + // // STLOC 00 + // // OVER + // // OVER + // // CAT + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f5ffffff + // // CLEAR + // // RET + // Run("VwEAAv//DwCIEYgCWYHyB3cAS0uLRW8AnXcAbwAl9f///0lA"); + // } + // + // [Benchmark] + // public void PoC_Left() + // { + // // INITSLOT 0100 + // // PUSHINT32 1048576 + // // NEWBUFFER + // // PUSHINT32 133333337 + // // STLOC 00 + // // DUP + // // PUSHINT32 1048576 + // // LEFT + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f1ffffff + // // CLEAR + // // RET + // Run("VwEAAgAAEACIAlmB8gd3AEoCAAAQAI1FbwCddwBvACXx////SUA="); + // } + // + // [Benchmark] + // public void PoC_Right() + // { + // // INITSLOT 0100 + // // PUSHINT32 1048576 + // // NEWBUFFER + // // PUSHINT32 133333337 + // // STLOC 00 + // // DUP + // // PUSHINT32 1048576 + // // RIGHT + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f1ffffff + // // CLEAR + // // RET + // Run("VwEAAgAAEACIAlmB8gd3AEoCAAAQAI5FbwCddwBvACXx////SUA="); + // } + // + // [Benchmark] + // public void PoC_ReverseN() + // { + // // INITSLOT 0100 + // // PUSHINT16 2040 + // // STLOC 00 + // // PUSHDATA1 aaabbbbbbbbbcccccccdddddddeeeeeeefffffff + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L cfffffff + // // PUSHINT32 23000000 + // // STLOC 00 + // // PUSHINT16 2040 + // // REVERSEN + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f5ffffff + // // CLEAR + // // RET + // Run("VwEAAfgHdwAMKGFhYWJiYmJiYmJiYmNjY2NjY2NkZGRkZGRkZWVlZWVlZWZmZmZmZmZvAJ13AG8AJc////8CwPNeAXcAAfgHVW8AnXcAbwAl9f///0lA"); + // } + // + // [Benchmark] + // public void PoC_Substr() + // { + // // INITSLOT 0100 + // // PUSHINT32 1048576 + // // NEWBUFFER + // // PUSHINT32 133333337 + // // STLOC 00 + // // DUP + // // PUSH0 + // // PUSHINT32 1048576 + // // SUBSTR + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f0ffffff + // // CLEAR + // // RET + // Run("VwEAAgAAEACIAlmB8gd3AEoQAgAAEACMRW8AnXcAbwAl8P///0lA"); + // } + // + // [Benchmark] + // public void PoC_NewArray() + // { + // // INITSLOT 0100 + // // PUSHINT32 1333333337 + // // STLOC 00 + // // PUSHINT16 2040 + // // NEWARRAY + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f4ffffff + // // RET + // Run("VwEAAlkNeU93AAH4B8NFbwCddwBvACX0////QA=="); + // } + // + // [Benchmark] + // public void PoC_NewStruct() + // { + // // INITSLOT 0100 + // // PUSHINT32 1333333337 + // // STLOC 00 + // // PUSHINT16 2040 + // // NEWSTRUCT + // // DROP + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f4ffffff + // // RET + // Run("VwEAAlkNeU93AAH4B8ZFbwCddwBvACX0////QA=="); + // } + // + // [Benchmark] + // public void PoC_Roll() + // { + // // INITSLOT 0100 + // // PUSHINT16 2040 + // // STLOC 00 + // // PUSHDATA1 aaabbbbbbbbbcccccccdddddddeeeeeeefffffff + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L cfffffff + // // PUSHINT32 23000000 + // // STLOC 00 + // // PUSHINT16 2039 + // // ROLL + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f5ffffff + // // CLEAR + // // RET + // Run("VwEAAfgHdwAMKGFhYWJiYmJiYmJiYmNjY2NjY2NkZGRkZGRkZWVlZWVlZWZmZmZmZmZvAJ13AG8AJc////8CwPNeAXcAAfcHUm8AnXcAbwAl9f///0lA"); + // } + // [Benchmark] public void PoC_XDrop() { @@ -327,71 +328,110 @@ public void PoC_XDrop() Run("VwEAAfgHdwAMKGFhYWJiYmJiYmJiYmNjY2NjY2NkZGRkZGRkZWVlZWVlZWZmZmZmZmZvAJ13AG8AJc////8CwPNeAXcAAfcHSEpvAJ13AG8AJfT///9JQA=="); } - [Benchmark] - public void PoC_MemCpy() - { - // INITSLOT 0100 - // PUSHINT32 1048576 - // NEWBUFFER - // PUSHINT32 1048576 - // NEWBUFFER - // PUSHINT32 133333337 - // STLOC 00 - // OVER - // PUSH0 - // PUSH2 - // PICK - // PUSH0 - // PUSHINT32 1048576 - // MEMCPY - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L eeffffff - // CLEAR - // RET - Run("VwEAAgAAEACIAgAAEACIAlmB8gd3AEsQEk0QAgAAEACJbwCddwBvACXu////SUA="); - } - - [Benchmark] - public void PoC_Unpack() - { - // INITSLOT 0200 - // PUSHINT16 1010 - // NEWARRAY - // STLOC 01 - // PUSHINT32 1333333337 - // STLOC 00 - // LDLOC 01 - // UNPACK - // CLEAR - // LDLOC 00 - // DEC - // STLOC 00 - // LDLOC 00 - // JMPIF_L f5ffffff - // RET - Run("VwIAAfIDw3cBAlkNeU93AG8BwUlvAJ13AG8AJfX///9A"); - } - - [Benchmark] - public void PoC_GetScriptContainer() - { - // SYSCALL System.Runtime.GetScriptContainer - // DROP - // JMP fa - Run("QS1RCDBFIvo="); - } + // + // [Benchmark] + // public void PoC_MemCpy() + // { + // // INITSLOT 0100 + // // PUSHINT32 1048576 + // // NEWBUFFER + // // PUSHINT32 1048576 + // // NEWBUFFER + // // PUSHINT32 133333337 + // // STLOC 00 + // // OVER + // // PUSH0 + // // PUSH2 + // // PICK + // // PUSH0 + // // PUSHINT32 1048576 + // // MEMCPY + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L eeffffff + // // CLEAR + // // RET + // Run("VwEAAgAAEACIAgAAEACIAlmB8gd3AEsQEk0QAgAAEACJbwCddwBvACXu////SUA="); + // } + // + // [Benchmark] + // public void PoC_Unpack() + // { + // // INITSLOT 0200 + // // PUSHINT16 1010 + // // NEWARRAY + // // STLOC 01 + // // PUSHINT32 1333333337 + // // STLOC 00 + // // LDLOC 01 + // // UNPACK + // // CLEAR + // // LDLOC 00 + // // DEC + // // STLOC 00 + // // LDLOC 00 + // // JMPIF_L f5ffffff + // // RET + // Run("VwIAAfIDw3cBAlkNeU93AG8BwUlvAJ13AG8AJfX///9A"); + // } + // + // [Benchmark] + // public void PoC_GetScriptContainer() + // { + // // SYSCALL System.Runtime.GetScriptContainer + // // DROP + // // JMP fa + // Run("QS1RCDBFIvo="); + // } private static void Run(string poc) { byte[] script = Convert.FromBase64String(poc); - using ExecutionEngine engine = new(); + using BenchmarkEngine engine = new(); engine.LoadScript(script); - engine.Execute(); + engine.ExecuteOneGASBenchmark(0.1); Debug.Assert(engine.State == VMState.HALT); } } } + +// | Method | Mean | Error | StdDev | Median | +// |----------------------- |----------------:|---------------:|---------------:|----------------:| +// | NeoIssue2528 | 740,984.75 us | 16,332.099 us | 45,256.170 us | 737,245.20 us | +// | NeoVMIssue418 | 578.16 us | 9.890 us | 7.722 us | 580.64 us | +// | NeoIssue2723 | 113.33 us | 5.251 us | 15.481 us | 120.80 us | +// | PoC_NewBuffer | 67.46 us | 0.779 us | 1.968 us | 67.35 us | +// | PoC_Cat | 67.96 us | 1.193 us | 1.058 us | 67.86 us | +// | PoC_Left | 69.39 us | 1.158 us | 1.083 us | 69.34 us | +// | PoC_Right | 68.62 us | 1.089 us | 1.019 us | 68.77 us | +// | PoC_ReverseN | 1,322,573.11 us | 132,628.605 us | 391,058.435 us | 1,442,513.35 us | +// | PoC_Substr | 68.89 us | 0.583 us | 0.487 us | 68.99 us | +// | PoC_NewArray | 397,972.81 us | 6,925.546 us | 6,478.160 us | 395,959.40 us | +// | PoC_NewStruct | 474,742.19 us | 9,288.273 us | 9,122.326 us | 471,287.55 us | +// | PoC_Roll | 135,784.36 us | 1,817.093 us | 1,610.805 us | 135,182.73 us | +// | PoC_XDrop | 129,951.49 us | 2,598.961 us | 2,668.941 us | 129,024.60 us | +// | PoC_MemCpy | 68.42 us | 0.833 us | 0.779 us | 68.16 us | +// | PoC_Unpack | 40,133.82 us | 490.800 us | 459.095 us | 40,296.00 us | +// | PoC_GetScriptContainer | 67.34 us | 0.731 us | 0.684 us | 67.24 us | + +// | Method | Mean | Error | StdDev | +// |----------------------- |--------------:|--------------:|--------------:| +// | NeoIssue2528 | 433,816.14 us | 15,616.644 us | 45,306.715 us | +// | NeoVMIssue418 | 566.97 us | 10.806 us | 16.502 us | +// | NeoIssue2723 | 71.90 us | 1.410 us | 1.930 us | +// | PoC_NewBuffer | 69.88 us | 1.386 us | 1.296 us | +// | PoC_Cat | 68.78 us | 0.855 us | 0.800 us | +// | PoC_Left | 70.77 us | 1.121 us | 0.993 us | +// | PoC_Right | 69.44 us | 0.749 us | 0.701 us | +// | PoC_ReverseN | 740,347.29 us | 6,775.672 us | 6,337.968 us | +// | PoC_Substr | 69.26 us | 1.017 us | 0.951 us | +// | PoC_NewArray | 397,103.96 us | 6,049.381 us | 5,051.507 us | +// | PoC_NewStruct | 475,245.18 us | 9,198.886 us | 8,604.644 us | +// | PoC_Roll | 132,328.30 us | 2,074.763 us | 1,940.735 us | +// | PoC_XDrop | 128,500.46 us | 1,895.092 us | 1,772.671 us | +// | PoC_MemCpy | 68.86 us | 0.735 us | 0.652 us | +// | PoC_Unpack | 39,979.99 us | 451.893 us | 422.701 us | +// | PoC_GetScriptContainer | 65.65 us | 0.782 us | 0.731 us | diff --git a/benchmarks/Neo.VM.Benchmarks/InstructionBuilder/InstructionBuilder.cs b/benchmarks/Neo.VM.Benchmarks/InstructionBuilder/InstructionBuilder.cs index 21d1b77de2..c9e2ad062f 100644 --- a/benchmarks/Neo.VM.Benchmarks/InstructionBuilder/InstructionBuilder.cs +++ b/benchmarks/Neo.VM.Benchmarks/InstructionBuilder/InstructionBuilder.cs @@ -14,7 +14,7 @@ namespace Neo.VM.Benchmark; -internal class InstructionBuilder +public class InstructionBuilder { internal readonly List _instructions = new(); diff --git a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs index e1a09d851e..ee511a6ab7 100644 --- a/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs +++ b/benchmarks/Neo.VM.Benchmarks/OpCode/Arithmetic/OpCode.GE.cs @@ -9,14 +9,66 @@ // Redistribution and use in source and binary forms with or without // modifications are permitted. +using BenchmarkDotNet.Attributes; +using Neo.Extensions; + namespace Neo.VM.Benchmark.OpCode; -public class OpCode_GE : OpCodeBase +public class OpCode_GE { - protected override byte[] CreateScript(BenchmarkMode benchmarkMode) + [ParamsSource(nameof(ScriptParams))] + public Script _script; + private BenchmarkEngine _engine; + + public static IEnumerable