neoneo-go/pkg/vm/stackitem
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
..
item.go stackitem: add some hint to 'seen' maps 2021-12-01 21:36:25 +03:00
item_test.go stackitem: make ByteArray an alias to []byte 2021-08-13 14:41:26 +03:00
json.go stackitem: add some hint to 'seen' maps 2021-12-01 21:36:25 +03:00
json_test.go native/std: restrict amount of items in JSON deserialization 2021-08-02 18:57:47 +03:00
reference.go vm: embed reference counter in compound items 2021-08-13 14:41:26 +03:00
serialization.go stackitem: use type switch more effectively 2021-12-01 21:36:35 +03:00
serialization_test.go stackitem: avoid going through Value() in serialization 2021-08-23 18:29:07 +03:00
type.go stackitem: rework error handling 2021-07-07 00:18:00 +03:00
type_test.go stackitem: allow to convert type from string 2020-07-31 16:07:16 +03:00