neoneo-go/pkg/vm
Roman Khimov af8a4da6d9 stackitem: use type switch more effectively
Reduce the number of allocations, save some time.

name               old time/op    new time/op    delta
EncodeBinary-8       51.2µs ± 8%    44.6µs ± 7%  -12.79%  (p=0.008 n=5+5)
SerializeSimple-8     523ns ± 5%     449ns ± 4%  -14.27%  (p=0.008 n=5+5)

name               old alloc/op   new alloc/op   delta
EncodeBinary-8        329kB ± 0%     329kB ± 0%   -0.12%  (p=0.008 n=5+5)
SerializeSimple-8      432B ± 0%      408B ± 0%   -5.56%  (p=0.008 n=5+5)

name               old allocs/op  new allocs/op  delta
EncodeBinary-8         36.0 ± 0%      20.0 ± 0%  -44.44%  (p=0.008 n=5+5)
SerializeSimple-8      7.00 ± 0%      6.00 ± 0%  -14.29%  (p=0.008 n=5+5)
2021-12-01 21:36:35 +03:00
..
cli Merge pull request #2283 from nspcc-dev/fix-vm-tests 2021-12-01 11:35:41 +03:00
emit vm/emit: improve error message 2021-07-22 14:23:32 +03:00
opcode vm: add PACKMAP/PACKSTRUCT, extend UNPACK 2021-11-12 17:19:59 +03:00
stackitem stackitem: use type switch more effectively 2021-12-01 21:36:35 +03:00
testdata vm: add PACKMAP/PACKSTRUCT, extend UNPACK 2021-11-12 17:19:59 +03:00
bench_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
context.go vm: simplify slot and make it private 2021-12-01 21:36:25 +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
invocation_tree.go rpc: add verbose parameter to invokefunction and invokescript 2021-11-20 21:57:41 +03:00
invocation_tree_test.go vm: add invocation tree tracing 2021-11-20 21:57:41 +03:00
json_test.go vm: simplify slot and make it private 2021-12-01 21:36:25 +03:00
opcodebench_test.go vm: simplify slot and make it private 2021-12-01 21:36:25 +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: simplify slot and make it private 2021-12-01 21:36:25 +03:00
slot_test.go vm: simplify slot and make it private 2021-12-01 21:36:25 +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 *: use internal variables for simple big.NewInt() values 2021-12-01 21:36:25 +03:00
vm_test.go vm: add PACKMAP/PACKSTRUCT, extend UNPACK 2021-11-12 17:19:59 +03:00