neoneo-go/pkg
Evgeniy Stratonikov eb7bd7b99b core: optimize storageFind
Because `Map` stores elements in arbitrary order, addition of new
element takes linear time (`Index` iterates over all keys). Thus our
`storageFind` is actually quadratic in time. Optimize this by creating
map from sorted slice.

```
name           old time/op    new time/op    delta
StorageFind-8     157µs ± 2%     112µs ± 1%  -28.60%  (p=0.000 n=10+10)

name           old alloc/op   new alloc/op   delta
StorageFind-8    69.4kB ± 0%    60.5kB ± 0%  -12.90%  (p=0.000 n=9+10)

name           old allocs/op  new allocs/op  delta
StorageFind-8     2.21k ± 0%     2.00k ± 0%   -9.37%  (p=0.000 n=10+7)
```

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-12 14:22:17 +03:00
..
compiler compiler/test: compile whole directory in examples 2021-06-28 11:50:40 +03:00
config config: make MaxValidUntilBlockIncrement configurable 2021-05-17 13:43:03 +03:00
consensus crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +03:00
core core: optimize storageFind 2021-07-12 14:22:17 +03:00
crypto keys: simplify code a bit 2021-06-17 21:55:00 +03:00
encoding *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
interop native/neo: add getAccountState method, close #1975 2021-05-27 10:59:38 +03:00
io *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
network network: optimize waiting in test 2021-07-08 11:14:35 +03:00
rpc rpc/server: fix sporadic test failures 2021-07-08 10:40:54 +03:00
services jsonpath: add tests for null objects, fix #2039 2021-07-07 12:27:10 +03:00
smartcontract callflag: add C#-compliant JSONization, fix #2040 2021-07-06 11:17:12 +03:00
util *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
vm vm: copy argument in unary opcodes, fix #2051 2021-07-08 17:09:04 +03:00
wallet *: regenerate test wallets with resources-friendly scrypt parameters 2021-06-11 15:22:32 +03:00