neoneo-go/pkg
Roman Khimov ee05f73b6f vm: simplify slot and make it private
Hiding refcounter inside a slot is actually a good idea, but it makes the
structure somewhat bigger, especially given that the refcounter is the same
and belongs more to VM or Context. New structure is a bit more efficient:

name                    old time/op    new time/op    delta
ScriptFibonacci-8          672µs ± 2%     644µs ± 0%  -4.15%  (p=0.008 n=5+5)
ScriptNestedRefCount-8    1.08ms ± 1%    1.05ms ± 2%  -2.56%  (p=0.008 n=5+5)
ScriptPushPop/4-8         1.52µs ± 1%    1.47µs ± 1%  -3.14%  (p=0.008 n=5+5)
ScriptPushPop/16-8        3.66µs ± 1%    3.54µs ± 1%  -3.24%  (p=0.008 n=5+5)
ScriptPushPop/128-8       24.7µs ± 1%    23.2µs ± 1%  -6.14%  (p=0.008 n=5+5)
ScriptPushPop/1024-8       183µs ± 1%     173µs ± 1%  -5.01%  (p=0.008 n=5+5)

name                    old alloc/op   new alloc/op   delta
ScriptFibonacci-8          114kB ± 0%     114kB ± 0%    ~     (p=0.079 n=4+5)
ScriptNestedRefCount-8     241kB ± 0%     241kB ± 0%    ~     (p=0.333 n=5+4)
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.17k ± 0%     3.17k ± 0%  -0.03%  (p=0.008 n=5+5)
ScriptNestedRefCount-8     10.7k ± 0%     10.7k ± 0%    ~     (all equal)
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)

It'd be especially nice to internalize static slot, but as we can't compare
slices it's not possible.
2021-12-01 21:36:25 +03:00
..
compiler Merge pull request #2270 from nspcc-dev/vm-invoked-contracts 2021-12-01 11:27:27 +03:00
config rpc: add server-side NEP-11 tracking API 2021-11-19 12:58:46 +03:00
consensus rpc: refactor calculatenetworkfee handler 2021-10-25 19:07:25 +03:00
core Merge pull request #2270 from nspcc-dev/vm-invoked-contracts 2021-12-01 11:27:27 +03:00
crypto keys: reuse coordLen where appropriate 2021-08-26 17:30:04 +03:00
encoding util: move ArrayReverse into package of its own 2021-07-19 22:57:55 +03:00
interop compiler: remove custom logic for util builtins 2021-10-23 16:12:47 +03:00
io *: fix tests failing due to path.Join usage 2021-11-29 11:11:09 +03:00
neotest neotest: extend Executor with DeployContractCheckFAULT 2021-11-18 12:28:04 +03:00
network network: fix data race in TestHandleMPTData, fix #2241 2021-11-15 12:37:01 +03:00
rpc Merge pull request #2270 from nspcc-dev/vm-invoked-contracts 2021-12-01 11:27:27 +03:00
services Merge pull request #2270 from nspcc-dev/vm-invoked-contracts 2021-12-01 11:27:27 +03:00
smartcontract *: use NEP-XX naming consistently in docs/comments 2021-11-19 12:58:46 +03:00
util util: reduce allocations in util.Uint256DecodeStringLE 2021-08-17 16:53:39 +03:00
vm vm: simplify slot and make it private 2021-12-01 21:36:25 +03:00
wallet Merge pull request #2264 from nspcc-dev/fix-win-tests 2021-11-29 11:25:35 +03:00