Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vm: add opcode benchmark #1493

Merged
merged 1 commit into from
Oct 16, 2020
Merged

vm: add opcode benchmark #1493

merged 1 commit into from
Oct 16, 2020

Conversation

roman-khimov
Copy link
Member

For future optimizations and price adjustments.

Not the prettiest piece of code in the world, but it gives some interesting results.

For future optimizations and price adjustments.
@roman-khimov roman-khimov added this to the v0.92.0 milestone Oct 15, 2020
@codecov
Copy link

codecov bot commented Oct 15, 2020

Codecov Report

Merging #1493 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1493      +/-   ##
==========================================
- Coverage   77.42%   77.41%   -0.02%     
==========================================
  Files         227      227              
  Lines       17702    17702              
==========================================
- Hits        13706    13704       -2     
- Misses       3054     3056       +2     
  Partials      942      942              
Impacted Files Coverage Δ
pkg/consensus/consensus.go 71.68% <0.00%> (-0.72%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7808ab2...0709e20. Read the comment docs.

@roman-khimov
Copy link
Member Author

My results:

BenchmarkOpcodes/NOP-8            100000               181 ns/op
BenchmarkOpcodes/PUSHINT8/00-8    100000               695 ns/op
BenchmarkOpcodes/PUSHINT8/FF-8    100000               737 ns/op
BenchmarkOpcodes/PUSHINT16/0000-8                 100000               728 ns/op
BenchmarkOpcodes/PUSHINT16/FFFF-8                 100000               743 ns/op
BenchmarkOpcodes/PUSHINT32/0000...-8              100000               726 ns/op
BenchmarkOpcodes/PUSHINT32/FFFF...-8              100000               777 ns/op
BenchmarkOpcodes/PUSHINT64/0000...-8              100000               743 ns/op
BenchmarkOpcodes/PUSHINT64/FFFF...-8              100000               789 ns/op
BenchmarkOpcodes/PUSHINT128/0000...-8             100000               818 ns/op
BenchmarkOpcodes/PUSHINT128/FFFF...-8             100000               854 ns/op
BenchmarkOpcodes/PUSHINT256/0000...-8             100000               835 ns/op
BenchmarkOpcodes/PUSHINT256/FFFF...-8             100000               940 ns/op
BenchmarkOpcodes/PUSHA/small_script-8             100000              2047 ns/op
BenchmarkOpcodes/PUSHA/big_script-8               100000            171633 ns/op
BenchmarkOpcodes/PUSHNULL-8                       100000               426 ns/op
BenchmarkOpcodes/PUSHDATA1/1-8                    100000               666 ns/op
BenchmarkOpcodes/PUSHDATA1/255-8                  100000               708 ns/op
BenchmarkOpcodes/PUSHDATA2/256-8                  100000               711 ns/op
BenchmarkOpcodes/PUSHDATA2/65535-8                100000              7581 ns/op
BenchmarkOpcodes/PUSHDATA4/64K-8                  100000             12997 ns/op
BenchmarkOpcodes/PUSHDATA4/1M-8                   100000            183448 ns/op
BenchmarkOpcodes/PUSHM1-8                         100000               704 ns/op
BenchmarkOpcodes/PUSH0-8                          100000               626 ns/op
BenchmarkOpcodes/JMP-8                            100000               336 ns/op
BenchmarkOpcodes/JMP_L-8                          100000               338 ns/op
BenchmarkOpcodes/JMPIF/false-8                    100000               367 ns/op
BenchmarkOpcodes/JMPIF/true-8                     100000               368 ns/op
BenchmarkOpcodes/JMPIF_L/false-8                  100000               362 ns/op
BenchmarkOpcodes/JMPIF_L/true-8                   100000               367 ns/op
BenchmarkOpcodes/JMPIFNOT/false-8                 100000               362 ns/op
BenchmarkOpcodes/JMPIFNOT/true-8                  100000               407 ns/op
BenchmarkOpcodes/JMPIFNOT_L/false-8               100000               423 ns/op
BenchmarkOpcodes/JMPIFNOT_L/true-8                100000               361 ns/op
BenchmarkOpcodes/JMPEQ/false/small-8              100000               402 ns/op
BenchmarkOpcodes/JMPEQ/false/big-8                100000              1012 ns/op
BenchmarkOpcodes/JMPEQ/true/small-8               100000               404 ns/op
BenchmarkOpcodes/JMPEQ/true/big-8                 100000              1041 ns/op
BenchmarkOpcodes/JMPEQ_L/false/small-8            100000               404 ns/op
BenchmarkOpcodes/JMPEQ_L/false/big-8              100000              1011 ns/op
BenchmarkOpcodes/JMPEQ_L/true/small-8             100000               406 ns/op
BenchmarkOpcodes/JMPEQ_L/true/big-8               100000              1005 ns/op
BenchmarkOpcodes/JMPNE/false/small-8              100000               393 ns/op
BenchmarkOpcodes/JMPNE/false/big-8                100000              1107 ns/op
BenchmarkOpcodes/JMPNE/true/small-8               100000               408 ns/op
BenchmarkOpcodes/JMPNE/true/big-8                 100000              1012 ns/op
BenchmarkOpcodes/JMPNE_L/false/small-8            100000               428 ns/op
BenchmarkOpcodes/JMPNE_L/false/big-8              100000              1008 ns/op
BenchmarkOpcodes/JMPNE_L/true/small-8             100000               416 ns/op
BenchmarkOpcodes/JMPNE_L/true/big-8               100000              1003 ns/op
BenchmarkOpcodes/JMPGT/false/small-8              100000               405 ns/op
BenchmarkOpcodes/JMPGT/false/big-8                100000               994 ns/op
BenchmarkOpcodes/JMPGT/true/small-8               100000               402 ns/op
BenchmarkOpcodes/JMPGT/true/big-8                 100000               993 ns/op
BenchmarkOpcodes/JMPGT_L/false/small-8            100000               402 ns/op
BenchmarkOpcodes/JMPGT_L/false/big-8              100000              1011 ns/op
BenchmarkOpcodes/JMPGT_L/true/small-8             100000               400 ns/op
BenchmarkOpcodes/JMPGT_L/true/big-8               100000              1003 ns/op
BenchmarkOpcodes/JMPGE/false/small-8              100000               396 ns/op
BenchmarkOpcodes/JMPGE/false/big-8                100000              1025 ns/op
BenchmarkOpcodes/JMPGE/true/small-8               100000               406 ns/op
BenchmarkOpcodes/JMPGE/true/big-8                 100000               991 ns/op
BenchmarkOpcodes/JMPGE_L/false/small-8            100000               395 ns/op
BenchmarkOpcodes/JMPGE_L/false/big-8              100000              1014 ns/op
BenchmarkOpcodes/JMPGE_L/true/small-8             100000               406 ns/op
BenchmarkOpcodes/JMPGE_L/true/big-8               100000               997 ns/op
BenchmarkOpcodes/JMPLT/false/small-8              100000               400 ns/op
BenchmarkOpcodes/JMPLT/false/big-8                100000              1011 ns/op
BenchmarkOpcodes/JMPLT/true/small-8               100000               412 ns/op
BenchmarkOpcodes/JMPLT/true/big-8                 100000               986 ns/op
BenchmarkOpcodes/JMPLT_L/false/small-8            100000               402 ns/op
BenchmarkOpcodes/JMPLT_L/false/big-8              100000              1013 ns/op
BenchmarkOpcodes/JMPLT_L/true/small-8             100000               408 ns/op
BenchmarkOpcodes/JMPLT_L/true/big-8               100000              1037 ns/op
BenchmarkOpcodes/JMPLE/false/small-8              100000               397 ns/op
BenchmarkOpcodes/JMPLE/false/big-8                100000              1138 ns/op
BenchmarkOpcodes/JMPLE/true/small-8               100000               406 ns/op
BenchmarkOpcodes/JMPLE/true/big-8                 100000              1023 ns/op
BenchmarkOpcodes/JMPLE_L/false/small-8            100000               409 ns/op
BenchmarkOpcodes/JMPLE_L/false/big-8              100000              1018 ns/op
BenchmarkOpcodes/JMPLE_L/true/small-8             100000               404 ns/op
BenchmarkOpcodes/JMPLE_L/true/big-8               100000              1001 ns/op
BenchmarkOpcodes/CALL-8                           100000               989 ns/op
BenchmarkOpcodes/CALL_L-8                         100000               993 ns/op
BenchmarkOpcodes/CALLA/small_script-8             100000              2320 ns/op
BenchmarkOpcodes/CALLA/big_script-8               100000            172234 ns/op
BenchmarkOpcodes/ABORT-8                          100000              1121 ns/op
BenchmarkOpcodes/ASSERT/true-8                    100000               256 ns/op
BenchmarkOpcodes/ASSERT/false-8                   100000              1100 ns/op
BenchmarkOpcodes/THROW/0/1-8                      100000               512 ns/op
BenchmarkOpcodes/THROW/0/16-8                     100000               514 ns/op
BenchmarkOpcodes/THROW/255/0-8                    100000              8647 ns/op
BenchmarkOpcodes/THROW/1023/0-8                   100000             43548 ns/op
BenchmarkOpcodes/TRY-8                            100000               799 ns/op
BenchmarkOpcodes/TRY_L-8                          100000               819 ns/op
BenchmarkOpcodes/ENDTRY/1-8                       100000               481 ns/op
BenchmarkOpcodes/ENDTRY/16-8                      100000               412 ns/op
BenchmarkOpcodes/ENDTRY_L/1-8                     100000               425 ns/op
BenchmarkOpcodes/ENDTRY_L/16-8                    100000               407 ns/op
BenchmarkOpcodes/ENDFINALLY/0/1-8                 100000               589 ns/op
BenchmarkOpcodes/ENDFINALLY/0/16-8                100000               582 ns/op
BenchmarkOpcodes/ENDFINALLY/255/0-8               100000             10253 ns/op
BenchmarkOpcodes/ENDFINALLY/1023/0-8              100000             43631 ns/op
BenchmarkOpcodes/RET-8                            100000               335 ns/op
BenchmarkOpcodes/SYSCALL-8                        100000               405 ns/op
BenchmarkOpcodes/DEPTH/0-8                        100000               829 ns/op
BenchmarkOpcodes/DEPTH/1024-8                     100000              1145 ns/op
BenchmarkOpcodes/DROP/1-8                         100000               261 ns/op
BenchmarkOpcodes/DROP/1024-8                      100000               975 ns/op
BenchmarkOpcodes/NIP/2-8                          100000               257 ns/op
BenchmarkOpcodes/NIP/1024-8                       100000               326 ns/op
BenchmarkOpcodes/XDROP/0/1-8      100000               225 ns/op
BenchmarkOpcodes/XDROP/0/1024-8                   100000               370 ns/op
BenchmarkOpcodes/XDROP/1024/1024-8                100000              3776 ns/op
BenchmarkOpcodes/XDROP/2047/2048-8                100000              9210 ns/op
BenchmarkOpcodes/CLEAR/0-8                        100000               284 ns/op
BenchmarkOpcodes/CLEAR/1024-8                     100000               391 ns/op
BenchmarkOpcodes/CLEAR/2048-8                     100000               466 ns/op
BenchmarkOpcodes/DUP/null-8                       100000               536 ns/op
BenchmarkOpcodes/DUP/boolean-8                    100000               660 ns/op
BenchmarkOpcodes/DUP/integer/small-8              100000               939 ns/op
BenchmarkOpcodes/DUP/integer/big-8                100000               830 ns/op
BenchmarkOpcodes/DUP/bytearray/small-8            100000               818 ns/op
BenchmarkOpcodes/DUP/bytearray/big-8              100000             13952 ns/op
BenchmarkOpcodes/DUP/buffer/small-8               100000               535 ns/op
BenchmarkOpcodes/DUP/buffer/big-8                 100000               691 ns/op
BenchmarkOpcodes/DUP/struct/small-8               100000               651 ns/op
BenchmarkOpcodes/DUP/struct/big-8                 100000               733 ns/op
BenchmarkOpcodes/DUP/pointer-8                    100000               704 ns/op
BenchmarkOpcodes/OVER/null-8                      100000               623 ns/op
BenchmarkOpcodes/OVER/boolean-8                   100000               705 ns/op
BenchmarkOpcodes/OVER/integer/small-8             100000               898 ns/op
BenchmarkOpcodes/OVER/integer/big-8               100000               842 ns/op
BenchmarkOpcodes/OVER/bytearray/small-8           100000               798 ns/op
BenchmarkOpcodes/OVER/bytearray/big-8             100000             13986 ns/op
BenchmarkOpcodes/OVER/buffer/small-8              100000               519 ns/op
BenchmarkOpcodes/OVER/buffer/big-8                100000               671 ns/op
BenchmarkOpcodes/OVER/struct/small-8              100000               681 ns/op
BenchmarkOpcodes/OVER/struct/big-8                100000               725 ns/op
BenchmarkOpcodes/OVER/pointer-8                   100000               742 ns/op
BenchmarkOpcodes/PICK/2/null-8                    100000               523 ns/op
BenchmarkOpcodes/PICK/2/boolean-8                 100000               693 ns/op
BenchmarkOpcodes/PICK/2/integer/small-8           100000               912 ns/op
BenchmarkOpcodes/PICK/2/integer/big-8             100000               783 ns/op
BenchmarkOpcodes/PICK/2/bytearray/small-8                 100000               795 ns/op
BenchmarkOpcodes/PICK/2/bytearray/big-8                   100000             12422 ns/op
BenchmarkOpcodes/PICK/2/buffer/small-8                    100000               538 ns/op
BenchmarkOpcodes/PICK/2/buffer/big-8                      100000               676 ns/op
BenchmarkOpcodes/PICK/2/struct/small-8                    100000               625 ns/op
BenchmarkOpcodes/PICK/2/struct/big-8                      100000               752 ns/op
BenchmarkOpcodes/PICK/2/pointer-8                         100000               706 ns/op
BenchmarkOpcodes/PICK/1024/null-8                         100000               728 ns/op
BenchmarkOpcodes/PICK/1024/boolean-8                      100000               855 ns/op
BenchmarkOpcodes/PICK/1024/integer/small-8                100000              1190 ns/op
BenchmarkOpcodes/PICK/1024/integer/big-8                  100000              1110 ns/op
BenchmarkOpcodes/PICK/1024/bytearray/small-8              100000              1050 ns/op
BenchmarkOpcodes/PICK/1024/bytearray/big-8                100000             12098 ns/op
BenchmarkOpcodes/PICK/1024/buffer/small-8                 100000               723 ns/op
BenchmarkOpcodes/PICK/1024/buffer/big-8                   100000               775 ns/op
BenchmarkOpcodes/PICK/1024/struct/small-8                 100000               885 ns/op
BenchmarkOpcodes/PICK/1024/pointer-8                      100000               860 ns/op
BenchmarkOpcodes/TUCK/null-8      100000               383 ns/op
BenchmarkOpcodes/TUCK/boolean-8                   100000               462 ns/op
BenchmarkOpcodes/TUCK/integer/small-8             100000               626 ns/op
BenchmarkOpcodes/TUCK/integer/big-8               100000               560 ns/op
BenchmarkOpcodes/TUCK/bytearray/small-8           100000               560 ns/op
BenchmarkOpcodes/TUCK/bytearray/big-8             100000              6809 ns/op
BenchmarkOpcodes/TUCK/buffer/small-8              100000               374 ns/op
BenchmarkOpcodes/TUCK/buffer/big-8                100000               527 ns/op
BenchmarkOpcodes/TUCK/struct/small-8              100000               538 ns/op
BenchmarkOpcodes/TUCK/struct/big-8                100000               535 ns/op
BenchmarkOpcodes/TUCK/pointer-8                   100000               557 ns/op
BenchmarkOpcodes/SWAP/null-8                      100000               228 ns/op
BenchmarkOpcodes/SWAP/integer-8                   100000               212 ns/op
BenchmarkOpcodes/SWAP/big_bytes-8                 100000               210 ns/op
BenchmarkOpcodes/ROT/null-8                       100000               207 ns/op
BenchmarkOpcodes/ROT/integer-8                    100000               208 ns/op
BenchmarkOpcodes/ROT/big_bytes-8                  100000               210 ns/op
BenchmarkOpcodes/ROLL/4/null-8                    100000               232 ns/op
BenchmarkOpcodes/ROLL/4/integer-8                 100000               252 ns/op
BenchmarkOpcodes/ROLL/4/big_bytes-8               100000               257 ns/op
BenchmarkOpcodes/ROLL/1024/null-8                 100000              2927 ns/op
BenchmarkOpcodes/ROLL/1024/integer-8              100000              3087 ns/op
BenchmarkOpcodes/ROLL/1024/big_bytes-8            100000              3064 ns/op
BenchmarkOpcodes/REVERSE3/null-8                  100000               210 ns/op
BenchmarkOpcodes/REVERSE3/integer-8               100000               214 ns/op
BenchmarkOpcodes/REVERSE3/big_bytes-8             100000               208 ns/op
BenchmarkOpcodes/REVERSE4/null-8                  100000               216 ns/op
BenchmarkOpcodes/REVERSE4/integer-8               100000               217 ns/op
BenchmarkOpcodes/REVERSE4/big_bytes-8             100000               213 ns/op
BenchmarkOpcodes/REVERSEN/5/null-8                100000               235 ns/op
BenchmarkOpcodes/REVERSEN/5/integer-8             100000               233 ns/op
BenchmarkOpcodes/REVERSEN/5/big_bytes-8           100000               233 ns/op
BenchmarkOpcodes/REVERSEN/1024/null-8             100000              4415 ns/op
BenchmarkOpcodes/REVERSEN/1024/integer-8                  100000              4590 ns/op
BenchmarkOpcodes/REVERSEN/1024/big_bytes-8                100000              4695 ns/op
BenchmarkOpcodes/INITSSLOT/1-8                            100000               479 ns/op
BenchmarkOpcodes/INITSSLOT/255-8                          100000              1323 ns/op
BenchmarkOpcodes/INITSLOT/1/1-8                           100000               694 ns/op
BenchmarkOpcodes/INITSLOT/1/255-8                         100000              6409 ns/op
BenchmarkOpcodes/INITSLOT/255/1-8                         100000              1659 ns/op
BenchmarkOpcodes/INITSLOT/255/255-8                       100000              7404 ns/op
BenchmarkOpcodes/LDSFLD0-8                                100000               394 ns/op
BenchmarkOpcodes/LDSFLD254-8                              100000               509 ns/op
BenchmarkOpcodes/STSFLD0-8                                100000               207 ns/op
BenchmarkOpcodes/STSFLD254-8                              100000               348 ns/op
BenchmarkOpcodes/LDLOC0-8                                 100000               406 ns/op
BenchmarkOpcodes/LDLOC254-8                               100000               528 ns/op
BenchmarkOpcodes/STLOC0-8                                 100000               226 ns/op
BenchmarkOpcodes/STLOC254-8                               100000               364 ns/op
BenchmarkOpcodes/LDARG0-8                                 100000               392 ns/op
BenchmarkOpcodes/LDARG254-8                               100000               543 ns/op
BenchmarkOpcodes/STARG0-8                                 100000               213 ns/op
BenchmarkOpcodes/STARG254-8                               100000               358 ns/op
BenchmarkOpcodes/NEWBUFFER/1-8                            100000               681 ns/op
BenchmarkOpcodes/NEWBUFFER/255-8                          100000               716 ns/op
BenchmarkOpcodes/NEWBUFFER/64K-8                          100000              5543 ns/op
BenchmarkOpcodes/NEWBUFFER/1M-8                           100000             85367 ns/op
BenchmarkOpcodes/MEMCPY/1-8                               100000               812 ns/op
BenchmarkOpcodes/MEMCPY/255-8                             100000               816 ns/op
BenchmarkOpcodes/MEMCPY/64K-8                             100000              6168 ns/op
BenchmarkOpcodes/MEMCPY/1M-8                              100000             83532 ns/op
BenchmarkOpcodes/CAT/1+1-8                                100000               852 ns/op
BenchmarkOpcodes/CAT/256+256-8                            100000               862 ns/op
BenchmarkOpcodes/CAT/64K+64K-8                            100000             16768 ns/op
BenchmarkOpcodes/CAT/512K+512K-8                          100000            128967 ns/op
BenchmarkOpcodes/SUBSTR/1-8                               100000              1605 ns/op
BenchmarkOpcodes/SUBSTR/256-8                             100000              1756 ns/op
BenchmarkOpcodes/SUBSTR/64K-8                             100000             10066 ns/op
BenchmarkOpcodes/SUBSTR/1M-8                              100000            182434 ns/op
BenchmarkOpcodes/LEFT/1-8         100000              1415 ns/op
BenchmarkOpcodes/LEFT/256-8       100000              1786 ns/op
BenchmarkOpcodes/LEFT/64K-8       100000             10844 ns/op
BenchmarkOpcodes/LEFT/1M-8        100000            185043 ns/op
BenchmarkOpcodes/RIGHT/1-8        100000              1700 ns/op
BenchmarkOpcodes/RIGHT/256-8      100000              1792 ns/op
BenchmarkOpcodes/RIGHT/64K-8      100000             10791 ns/op
BenchmarkOpcodes/RIGHT/1M-8       100000            182525 ns/op
BenchmarkOpcodes/INVERT/1-8       100000               511 ns/op
BenchmarkOpcodes/INVERT/0-8       100000               518 ns/op
BenchmarkOpcodes/INVERT/big-8     100000               854 ns/op
BenchmarkOpcodes/INVERT/big_negative-8            100000               965 ns/op
BenchmarkOpcodes/SIGN/1-8                         100000               765 ns/op
BenchmarkOpcodes/SIGN/0-8                         100000               667 ns/op
BenchmarkOpcodes/SIGN/big-8                       100000              1038 ns/op
BenchmarkOpcodes/SIGN/big_negative-8              100000              1100 ns/op
BenchmarkOpcodes/ABS/1-8                          100000               510 ns/op
BenchmarkOpcodes/ABS/0-8                          100000               519 ns/op
BenchmarkOpcodes/ABS/big-8                        100000               839 ns/op
BenchmarkOpcodes/ABS/big_negative-8               100000               962 ns/op
BenchmarkOpcodes/NEGATE/1-8                       100000               515 ns/op
BenchmarkOpcodes/NEGATE/0-8                       100000               526 ns/op
BenchmarkOpcodes/NEGATE/big-8                     100000               829 ns/op
BenchmarkOpcodes/NEGATE/big_negative-8            100000              1304 ns/op
BenchmarkOpcodes/INC/1-8                          100000               932 ns/op
BenchmarkOpcodes/INC/0-8                          100000               800 ns/op
BenchmarkOpcodes/INC/big-8                        100000              1233 ns/op
BenchmarkOpcodes/INC/big_negative-8               100000              1204 ns/op
BenchmarkOpcodes/DEC/1-8                          100000               817 ns/op
BenchmarkOpcodes/DEC/0-8                          100000               821 ns/op
BenchmarkOpcodes/DEC/big-8                        100000              1219 ns/op
BenchmarkOpcodes/DEC/big_negative-8               100000              1240 ns/op
BenchmarkOpcodes/NOT/1-8                          100000               502 ns/op
BenchmarkOpcodes/NOT/0-8                          100000               506 ns/op
BenchmarkOpcodes/NOT/big-8                        100000               499 ns/op
BenchmarkOpcodes/NOT/big_negative-8               100000               527 ns/op
BenchmarkOpcodes/NZ/1-8                           100000               518 ns/op
BenchmarkOpcodes/NZ/0-8                           100000               505 ns/op
BenchmarkOpcodes/NZ/big-8                         100000               808 ns/op
BenchmarkOpcodes/NZ/big_negative-8                100000               884 ns/op
BenchmarkOpcodes/AND/0+0-8                        100000               734 ns/op
BenchmarkOpcodes/AND/1+1-8                        100000               819 ns/op
BenchmarkOpcodes/AND/1/big-8                      100000              1056 ns/op
BenchmarkOpcodes/AND/big/big-8                    100000              1220 ns/op
BenchmarkOpcodes/AND/big/bigneg-8                 100000              1637 ns/op
BenchmarkOpcodes/OR/0+0-8                         100000               730 ns/op
BenchmarkOpcodes/OR/1+1-8                         100000               801 ns/op
BenchmarkOpcodes/OR/1/big-8                       100000              1109 ns/op
BenchmarkOpcodes/OR/big/big-8                     100000              1257 ns/op
BenchmarkOpcodes/OR/big/bigneg-8                  100000              1450 ns/op
BenchmarkOpcodes/XOR/0+0-8                        100000               740 ns/op
BenchmarkOpcodes/XOR/1+1-8                        100000               825 ns/op
BenchmarkOpcodes/XOR/1/big-8                      100000              1125 ns/op
BenchmarkOpcodes/XOR/big/big-8                    100000              1276 ns/op
BenchmarkOpcodes/XOR/big/bigneg-8                 100000              1659 ns/op
BenchmarkOpcodes/ADD/0+0-8                        100000               721 ns/op
BenchmarkOpcodes/ADD/1+1-8                        100000               817 ns/op
BenchmarkOpcodes/ADD/1/big-8                      100000              1100 ns/op
BenchmarkOpcodes/ADD/big/big-8                    100000              1273 ns/op
BenchmarkOpcodes/ADD/big/bigneg-8                 100000              1501 ns/op
BenchmarkOpcodes/SUB/0+0-8                        100000               723 ns/op
BenchmarkOpcodes/SUB/1+1-8                        100000               824 ns/op
BenchmarkOpcodes/SUB/1/big-8                      100000              1084 ns/op
BenchmarkOpcodes/SUB/big/big-8                    100000              1245 ns/op
BenchmarkOpcodes/SUB/big/bigneg-8                 100000              1489 ns/op
BenchmarkOpcodes/BOOLAND/0+0-8                    100000               537 ns/op
BenchmarkOpcodes/BOOLAND/1+1-8                    100000               543 ns/op
BenchmarkOpcodes/BOOLAND/1/big-8                  100000               565 ns/op
BenchmarkOpcodes/BOOLAND/big/big-8                100000               554 ns/op
BenchmarkOpcodes/BOOLAND/big/bigneg-8             100000               559 ns/op
BenchmarkOpcodes/BOOLOR/0+0-8                     100000               528 ns/op
BenchmarkOpcodes/BOOLOR/1+1-8                     100000               524 ns/op
BenchmarkOpcodes/BOOLOR/1/big-8                   100000               558 ns/op
BenchmarkOpcodes/BOOLOR/big/big-8                 100000               555 ns/op
BenchmarkOpcodes/BOOLOR/big/bigneg-8              100000               606 ns/op
BenchmarkOpcodes/NUMEQUAL/0+0-8                   100000               561 ns/op
BenchmarkOpcodes/NUMEQUAL/1+1-8                   100000               556 ns/op
BenchmarkOpcodes/NUMEQUAL/1/big-8                 100000               822 ns/op
BenchmarkOpcodes/NUMEQUAL/big/big-8               100000               994 ns/op
BenchmarkOpcodes/NUMEQUAL/big/bigneg-8            100000              1148 ns/op
BenchmarkOpcodes/NUMNOTEQUAL/0+0-8                100000               526 ns/op
BenchmarkOpcodes/NUMNOTEQUAL/1+1-8                100000               581 ns/op
BenchmarkOpcodes/NUMNOTEQUAL/1/big-8              100000               848 ns/op
BenchmarkOpcodes/NUMNOTEQUAL/big/big-8            100000              1034 ns/op
BenchmarkOpcodes/NUMNOTEQUAL/big/bigneg-8         100000              1158 ns/op
BenchmarkOpcodes/LT/0+0-8                         100000               626 ns/op
BenchmarkOpcodes/LT/1+1-8                         100000               622 ns/op
BenchmarkOpcodes/LT/1/big-8                       100000               857 ns/op
BenchmarkOpcodes/LT/big/big-8                     100000               971 ns/op
BenchmarkOpcodes/LT/big/bigneg-8                  100000              1193 ns/op
BenchmarkOpcodes/LTE/0+0-8                        100000               553 ns/op
BenchmarkOpcodes/LTE/1+1-8                        100000               564 ns/op
BenchmarkOpcodes/LTE/1/big-8                      100000               871 ns/op
BenchmarkOpcodes/LTE/big/big-8                    100000               998 ns/op
BenchmarkOpcodes/LTE/big/bigneg-8                 100000              1157 ns/op
BenchmarkOpcodes/GT/0+0-8                         100000               533 ns/op
BenchmarkOpcodes/GT/1+1-8                         100000               530 ns/op
BenchmarkOpcodes/GT/1/big-8                       100000               841 ns/op
BenchmarkOpcodes/GT/big/big-8                     100000              1099 ns/op
BenchmarkOpcodes/GT/big/bigneg-8                  100000              1130 ns/op
BenchmarkOpcodes/GTE/0+0-8                        100000               548 ns/op
BenchmarkOpcodes/GTE/1+1-8                        100000               554 ns/op
BenchmarkOpcodes/GTE/1/big-8                      100000               941 ns/op
BenchmarkOpcodes/GTE/big/big-8                    100000               971 ns/op
BenchmarkOpcodes/GTE/big/bigneg-8                 100000              1133 ns/op
BenchmarkOpcodes/MIN/0+0-8                        100000               586 ns/op
BenchmarkOpcodes/MIN/1+1-8                        100000               583 ns/op
BenchmarkOpcodes/MIN/1/big-8                      100000               873 ns/op
BenchmarkOpcodes/MIN/big/big-8                    100000              1056 ns/op
BenchmarkOpcodes/MIN/big/bigneg-8                 100000              1232 ns/op
BenchmarkOpcodes/MAX/0+0-8                        100000               583 ns/op
BenchmarkOpcodes/MAX/1+1-8                        100000               591 ns/op
BenchmarkOpcodes/MAX/1/big-8                      100000               887 ns/op
BenchmarkOpcodes/MAX/big/big-8                    100000              1034 ns/op
BenchmarkOpcodes/MAX/big/bigneg-8                 100000              1328 ns/op
BenchmarkOpcodes/EQUAL/bools-8                    100000               616 ns/op
BenchmarkOpcodes/EQUAL/small_integers-8           100000               562 ns/op
BenchmarkOpcodes/EQUAL/big_integers-8             100000               611 ns/op
BenchmarkOpcodes/EQUAL/255B-8                     100000               606 ns/op
BenchmarkOpcodes/EQUAL/64KEQ-8                    100000              2901 ns/op
BenchmarkOpcodes/EQUAL/64KNEQ-8                   100000               561 ns/op
BenchmarkOpcodes/NOTEQUAL/bools-8                 100000               487 ns/op
BenchmarkOpcodes/NOTEQUAL/small_integers-8                100000               513 ns/op
BenchmarkOpcodes/NOTEQUAL/big_integers-8                  100000               544 ns/op
BenchmarkOpcodes/NOTEQUAL/255B-8                          100000               552 ns/op
BenchmarkOpcodes/NOTEQUAL/64KEQ-8                         100000              2629 ns/op
BenchmarkOpcodes/NOTEQUAL/64KNEQ-8                        100000               535 ns/op
BenchmarkOpcodes/MUL/1+0-8                                100000               696 ns/op
BenchmarkOpcodes/MUL/100/big-8                            100000               999 ns/op
BenchmarkOpcodes/MUL/16ff*16ff-8                          100000              1219 ns/op
BenchmarkOpcodes/DIV/0/1-8                                100000               712 ns/op
BenchmarkOpcodes/DIV/big/100-8                            100000              1086 ns/op
BenchmarkOpcodes/DIV/bigneg/big-8                         100000              1505 ns/op
BenchmarkOpcodes/MOD/1+1-8                                100000               858 ns/op
BenchmarkOpcodes/MOD/big/100-8                            100000              1209 ns/op
BenchmarkOpcodes/MOD/big/bigneg-8                         100000              1556 ns/op
BenchmarkOpcodes/SHL/1/1-8                                100000               835 ns/op
BenchmarkOpcodes/SHL/1/254-8                              100000               866 ns/op
BenchmarkOpcodes/SHL/big/7-8                              100000              1079 ns/op
BenchmarkOpcodes/SHL/bigneg/7-8                           100000              1149 ns/op
BenchmarkOpcodes/SHL/16ff/15-8                            100000              1067 ns/op
BenchmarkOpcodes/SHR/1/1-8                                100000               817 ns/op
BenchmarkOpcodes/SHR/1/254-8                              100000               712 ns/op
BenchmarkOpcodes/SHR/big/254-8                            100000              1059 ns/op
BenchmarkOpcodes/SHR/bigneg/7-8                           100000              1191 ns/op
BenchmarkOpcodes/SHR/16ff/15-8                            100000              1015 ns/op
BenchmarkOpcodes/WITHIN/0/1/2-8                           100000               524 ns/op
BenchmarkOpcodes/WITHIN/bigNeg/1/big-8                    100000              1095 ns/op
BenchmarkOpcodes/WITHIN/bigNeg/big/max-8                  100000              1338 ns/op
BenchmarkOpcodes/NEWARRAY0-8                              100000               918 ns/op
BenchmarkOpcodes/NEWSTRUCT0-8                             100000               894 ns/op
BenchmarkOpcodes/NEWMAP-8                                 100000               830 ns/op
BenchmarkOpcodes/NEWARRAY/1-8                             100000              1090 ns/op
BenchmarkOpcodes/NEWARRAY/255-8                           100000              3972 ns/op
BenchmarkOpcodes/NEWARRAY/1024-8                          100000             11575 ns/op
BenchmarkOpcodes/NEWSTRUCT/1-8                            100000              1021 ns/op
BenchmarkOpcodes/NEWSTRUCT/255-8                          100000              3893 ns/op
BenchmarkOpcodes/NEWSTRUCT/1024-8                         100000             12014 ns/op
BenchmarkOpcodes/NEWARRAYT/Any/1-8                        100000              1184 ns/op
BenchmarkOpcodes/NEWARRAYT/Pointer/1-8                    100000              1167 ns/op
BenchmarkOpcodes/NEWARRAYT/Boolean/1-8                    100000              1202 ns/op
BenchmarkOpcodes/NEWARRAYT/Integer/1-8                    100000              1353 ns/op
BenchmarkOpcodes/NEWARRAYT/ByteString/1-8                 100000              1172 ns/op
BenchmarkOpcodes/NEWARRAYT/Buffer/1-8                     100000              1089 ns/op
BenchmarkOpcodes/NEWARRAYT/Array/1-8                      100000              1129 ns/op
BenchmarkOpcodes/NEWARRAYT/Struct/1-8                     100000              1170 ns/op
BenchmarkOpcodes/NEWARRAYT/Map/1-8                        100000              1187 ns/op
BenchmarkOpcodes/NEWARRAYT/Interop/1-8                    100000              1171 ns/op
BenchmarkOpcodes/NEWARRAYT/Any/255-8                      100000              3908 ns/op
BenchmarkOpcodes/NEWARRAYT/Pointer/255-8                  100000              3949 ns/op
BenchmarkOpcodes/NEWARRAYT/Boolean/255-8                  100000              7278 ns/op
BenchmarkOpcodes/NEWARRAYT/Integer/255-8                  100000             22436 ns/op
BenchmarkOpcodes/NEWARRAYT/ByteString/255-8               100000             13827 ns/op
BenchmarkOpcodes/NEWARRAYT/Buffer/255-8                   100000              3958 ns/op
BenchmarkOpcodes/NEWARRAYT/Array/255-8                    100000              3937 ns/op
BenchmarkOpcodes/NEWARRAYT/Struct/255-8                   100000              3945 ns/op
BenchmarkOpcodes/NEWARRAYT/Map/255-8                      100000              3908 ns/op
BenchmarkOpcodes/NEWARRAYT/Interop/255-8                  100000              3943 ns/op
BenchmarkOpcodes/NEWARRAYT/Any/1024-8                     100000             11639 ns/op
BenchmarkOpcodes/NEWARRAYT/Pointer/1024-8                 100000             11615 ns/op
BenchmarkOpcodes/NEWARRAYT/Boolean/1024-8                 100000             23941 ns/op
BenchmarkOpcodes/NEWARRAYT/Integer/1024-8                 100000             85460 ns/op
BenchmarkOpcodes/NEWARRAYT/ByteString/1024-8              100000             52568 ns/op
BenchmarkOpcodes/NEWARRAYT/Buffer/1024-8                  100000             11969 ns/op
BenchmarkOpcodes/NEWARRAYT/Array/1024-8                   100000             13361 ns/op
BenchmarkOpcodes/NEWARRAYT/Struct/1024-8                  100000             12103 ns/op
BenchmarkOpcodes/NEWARRAYT/Map/1024-8                     100000             12232 ns/op
BenchmarkOpcodes/NEWARRAYT/Interop/1024-8                 100000             12145 ns/op
BenchmarkOpcodes/PACK/1-8                                 100000              1144 ns/op
BenchmarkOpcodes/PACK/255-8                               100000              6074 ns/op
BenchmarkOpcodes/PACK/1024-8                              100000             19835 ns/op
BenchmarkOpcodes/UNPACK/1-8                               100000              1224 ns/op
BenchmarkOpcodes/UNPACK/255-8                             100000             21861 ns/op
BenchmarkOpcodes/UNPACK/1024-8                            100000             78555 ns/op
BenchmarkOpcodes/SIZE/array/1-8                   100000               891 ns/op
BenchmarkOpcodes/SIZE/array/1024-8                100000              5109 ns/op
BenchmarkOpcodes/SIZE/map/1024-8                  100000              6130 ns/op
BenchmarkOpcodes/SIZE/bytes/255-8                 100000               737 ns/op
BenchmarkOpcodes/SIZE/bytes/64K-8                 100000               754 ns/op
BenchmarkOpcodes/SIZE/bytes/1M-8                  100000               704 ns/op
BenchmarkOpcodes/HASKEY/array/1-8                 100000              4777 ns/op
BenchmarkOpcodes/HASKEY/array/1023-8              100000              4884 ns/op
BenchmarkOpcodes/HASKEY/array/1024-8              100000              4870 ns/op
BenchmarkOpcodes/HASKEY/map/1-8                   100000              5712 ns/op
BenchmarkOpcodes/HASKEY/map/1023-8                100000             17860 ns/op
BenchmarkOpcodes/HASKEY/map/1024-8                100000             17767 ns/op
BenchmarkOpcodes/HASKEY/buffer/255-8              100000              1078 ns/op
BenchmarkOpcodes/HASKEY/buffer/64K-8              100000              1366 ns/op
BenchmarkOpcodes/HASKEY/buffer/1M-8               100000              1364 ns/op
BenchmarkOpcodes/KEYS/map/1024-8                  100000            105496 ns/op
BenchmarkOpcodes/VALUES/array/1-8                 100000               950 ns/op
BenchmarkOpcodes/VALUES/array/1024-8              100000             18121 ns/op
BenchmarkOpcodes/VALUES/map/1024-8                100000             19619 ns/op
BenchmarkOpcodes/PICKITEM/array/1-8               100000              5072 ns/op
BenchmarkOpcodes/PICKITEM/array/1023-8            100000              5180 ns/op
BenchmarkOpcodes/PICKITEM/map/1-8                 100000              6025 ns/op
BenchmarkOpcodes/PICKITEM/map/1023-8              100000             18637 ns/op
BenchmarkOpcodes/PICKITEM/bytes/255-8             100000               654 ns/op
BenchmarkOpcodes/PICKITEM/bytes/64K-8             100000               724 ns/op
BenchmarkOpcodes/PICKITEM/bytes/1M-8              100000               797 ns/op
BenchmarkOpcodes/APPEND/array/1-8                 100000               688 ns/op
BenchmarkOpcodes/APPEND/array/1023-8              100000             12377 ns/op
BenchmarkOpcodes/APPEND/struct/1-8                100000               686 ns/op
BenchmarkOpcodes/APPEND/struct/1023-8             100000             11931 ns/op
BenchmarkOpcodes/APPEND/array/struct-8            100000             27836 ns/op
BenchmarkOpcodes/SETITEM/array/1-8                100000              5650 ns/op
BenchmarkOpcodes/SETITEM/array/1023-8             100000              5239 ns/op
BenchmarkOpcodes/SETITEM/map/1-8                  100000              5693 ns/op
BenchmarkOpcodes/SETITEM/map/1023-8               100000             29996 ns/op
BenchmarkOpcodes/SETITEM/buffer/255-8             100000               792 ns/op
BenchmarkOpcodes/SETITEM/buffer/1M-8              100000               796 ns/op
BenchmarkOpcodes/REVERSEITEMS/array/1024-8                100000              6522 ns/op
BenchmarkOpcodes/REVERSEITEMS/buffer/1M-8                 100000            862725 ns/op
BenchmarkOpcodes/KEYS/map/1024-8                  100000            105496 ns/op
BenchmarkOpcodes/VALUES/array/1-8                 100000               950 ns/op
BenchmarkOpcodes/VALUES/array/1024-8              100000             18121 ns/op
BenchmarkOpcodes/VALUES/map/1024-8                100000             19619 ns/op
BenchmarkOpcodes/PICKITEM/array/1-8               100000              5072 ns/op
BenchmarkOpcodes/PICKITEM/array/1023-8            100000              5180 ns/op
BenchmarkOpcodes/PICKITEM/map/1-8                 100000              6025 ns/op
BenchmarkOpcodes/PICKITEM/map/1023-8              100000             18637 ns/op
BenchmarkOpcodes/PICKITEM/bytes/255-8             100000               654 ns/op
BenchmarkOpcodes/PICKITEM/bytes/64K-8             100000               724 ns/op
BenchmarkOpcodes/PICKITEM/bytes/1M-8              100000               797 ns/op
BenchmarkOpcodes/APPEND/array/1-8                 100000               688 ns/op
BenchmarkOpcodes/APPEND/array/1023-8              100000             12377 ns/op
BenchmarkOpcodes/APPEND/struct/1-8                100000               686 ns/op
BenchmarkOpcodes/APPEND/struct/1023-8             100000             11931 ns/op
BenchmarkOpcodes/APPEND/array/struct-8            100000             27836 ns/op
BenchmarkOpcodes/SETITEM/array/1-8                100000              5650 ns/op
BenchmarkOpcodes/SETITEM/array/1023-8             100000              5239 ns/op
BenchmarkOpcodes/SETITEM/map/1-8                  100000              5693 ns/op
BenchmarkOpcodes/SETITEM/map/1023-8               100000             29996 ns/op
BenchmarkOpcodes/SETITEM/buffer/255-8             100000               792 ns/op
BenchmarkOpcodes/SETITEM/buffer/1M-8              100000               796 ns/op
BenchmarkOpcodes/REVERSEITEMS/array/1024-8                100000              6522 ns/op
BenchmarkOpcodes/REVERSEITEMS/buffer/1M-8                 100000            862725 ns/op
BenchmarkOpcodes/REMOVE/array/1-8                         100000              5057 ns/op
BenchmarkOpcodes/REMOVE/array/255-8                       100000              5079 ns/op
BenchmarkOpcodes/REMOVE/array/1023-8                      100000              5181 ns/op
BenchmarkOpcodes/REMOVE/map/1-8                           100000              6240 ns/op
BenchmarkOpcodes/REMOVE/map/255-8                         100000              9384 ns/op
BenchmarkOpcodes/REMOVE/map/1023-8                        100000             18050 ns/op
BenchmarkOpcodes/CLEARITEMS/array/1024-8                  100000              8503 ns/op
BenchmarkOpcodes/CLEARITEMS/map/1024-8                    100000              9822 ns/op
BenchmarkOpcodes/ISNULL/null-8                            100000               510 ns/op
BenchmarkOpcodes/ISNULL/integer-8                         100000               506 ns/op
BenchmarkOpcodes/ISTYPE/null/null-8                       100000               557 ns/op
BenchmarkOpcodes/ISTYPE/integer/integer-8                 100000               552 ns/op
BenchmarkOpcodes/ISTYPE/null/integer-8                    100000               555 ns/op
BenchmarkOpcodes/CONVERT/bytes/integer-8                  100000              1050 ns/op
BenchmarkOpcodes/CONVERT/integer/bytes-8                  100000               604 ns/op
BenchmarkOpcodes/CONVERT/array/struct-8                   100000             15399 ns/op


func maxNumber() []byte {
s := ffSlice(32)
s[0] = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 0x7F ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember exactly now, but it can be tuned a bit, true.

@roman-khimov roman-khimov merged commit 6849499 into master Oct 16, 2020
@roman-khimov roman-khimov deleted the vm-opcode-bench branch October 16, 2020 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants