neoneo-go/pkg/vm
Roman Khimov a3892aa662 vm: don't use PushVal when item type is known
PushVal is very convenient, but type switch is somewhat expensive.

name                    old time/op    new time/op    delta
ScriptFibonacci-8          736µs ± 1%     602µs ± 1%  -18.21%  (p=0.000 n=9+10)
ScriptNestedRefCount-8    1.08ms ± 2%    0.96ms ± 1%  -11.13%  (p=0.000 n=10+10)
ScriptPushPop/4-8         1.48µs ± 3%    1.35µs ± 2%   -9.14%  (p=0.000 n=10+9)
ScriptPushPop/16-8        3.59µs ± 1%    3.38µs ± 1%   -6.01%  (p=0.000 n=10+10)
ScriptPushPop/128-8       23.7µs ± 1%    22.6µs ± 1%   -4.39%  (p=0.000 n=10+8)
ScriptPushPop/1024-8       176µs ± 2%     167µs ± 3%   -5.24%  (p=0.000 n=9+10)

name                    old alloc/op   new alloc/op   delta
ScriptFibonacci-8          123kB ± 0%     114kB ± 0%   -6.88%  (p=0.000 n=10+9)
ScriptNestedRefCount-8     266kB ± 0%     241kB ± 0%   -9.23%  (p=0.000 n=8+10)
ScriptPushPop/4-8           160B ± 0%      160B ± 0%     ~     (all equal)
ScriptPushPop/16-8          640B ± 0%      640B ± 0%     ~     (all equal)
ScriptPushPop/128-8       8.70kB ± 0%    8.70kB ± 0%     ~     (all equal)
ScriptPushPop/1024-8      73.2kB ± 0%    73.2kB ± 0%     ~     (all equal)

name                    old allocs/op  new allocs/op  delta
ScriptFibonacci-8          3.53k ± 0%     3.17k ± 0%   -9.98%  (p=0.000 n=10+10)
ScriptNestedRefCount-8     11.8k ± 0%     10.7k ± 0%   -8.70%  (p=0.000 n=10+10)
ScriptPushPop/4-8           8.00 ± 0%      8.00 ± 0%     ~     (all equal)
ScriptPushPop/16-8          32.0 ± 0%      32.0 ± 0%     ~     (all equal)
ScriptPushPop/128-8          259 ± 0%       259 ± 0%     ~     (all equal)
ScriptPushPop/1024-8       2.05k ± 0%     2.05k ± 0%     ~     (all equal)
2021-08-30 23:43:58 +03:00
..
cli *: make tests use TempDir(), fix #1319 2021-08-26 17:29:40 +03:00
emit vm/emit: improve error message 2021-07-22 14:23:32 +03:00
opcode opcode: optimize IsValid 2021-08-02 21:46:19 +03:00
stackitem stackitem: avoid going through Value() in serialization 2021-08-23 18:29:07 +03:00
testdata opcode: fix GTE, LTE string representations 2021-04-29 16:08:48 +03:00
bench_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
context.go vm: don't use PushVal when item type is known 2021-08-30 23:43:58 +03:00
contract_checks.go stackitem: completely drop MaxArraySize 2021-07-19 15:42:42 +03:00
contract_checks_test.go core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1 2021-03-10 21:46:05 +03:00
debug_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
exception.go stackitem: change Bool() to TryBool(), prepare for its failures 2020-08-21 20:55:20 +03:00
interop.go interop: remove System.Iterator.Create, fix #1935 2021-05-11 12:13:30 +03:00
json_test.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
opcodebench_test.go opcode: fix GTE, LTE string representations 2021-04-29 16:08:48 +03:00
ref_counter.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
ref_counter_test.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
slot.go vm: store refcounter directly in VM 2021-08-11 13:25:58 +03:00
slot_test.go vm: allow to initialize static slot in method 2020-07-27 13:00:35 +03:00
stack.go vm: don't use PushVal when item type is known 2021-08-30 23:43:58 +03:00
stack_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
state.go remove github.com/pkg/errors from dependencies 2020-08-07 12:21:52 +03:00
state_test.go core, vm: store VMState as byte instead of string 2020-07-29 10:14:08 +03:00
vm.go vm: don't use PushVal when item type is known 2021-08-30 23:43:58 +03:00
vm_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00