neoneo-go/pkg/core
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
..
block *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
blockchainer rpc: add CalculateNetworkFee RPC method 2021-03-26 19:14:46 +03:00
chaindump block: drop Network from the Header 2021-03-26 13:45:18 +03:00
dao *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
fee core: add price for CALLT instruction 2021-06-07 19:17:22 +03:00
interop stackitem: remove Item/StackItem from function names 2021-07-06 19:56:23 +03:00
mempool core: move mempool.Event to a separate package 2021-06-01 12:24:28 +03:00
mempoolevent core: move mempool.Event to a separate package 2021-06-01 12:24:28 +03:00
mpt mpt: do not create an Extension for the last child of a Branch 2021-07-07 15:49:53 +03:00
native native: copy contract on update 2021-07-08 10:40:54 +03:00
state state/result: save/return real JSONization errors 2021-07-07 00:42:36 +03:00
stateroot core: allow to add several headers with StateRootInHeader on 2021-06-30 11:56:05 +03:00
storage storage: convert key once in MemoryStore.seek 2021-07-12 14:14:32 +03:00
test_data change block/tx/extensible signing process, fix #1741 2021-03-12 11:27:50 +03:00
transaction config: make MaxValidUntilBlockIncrement configurable 2021-05-17 13:43:03 +03:00
blockchain.go core: don't copy config in ApplyPolicyToTxSet 2021-07-09 13:01:42 +03:00
blockchain_test.go core: allow to add several headers with StateRootInHeader on 2021-06-30 11:56:05 +03:00
doc.go core: add Blockchain event subscription mechanism 2020-05-25 00:27:39 +03:00
helper_test.go core/test: use testing.TB in constructors 2021-07-12 14:20:45 +03:00
interop_system.go core: optimize storageFind 2021-07-12 14:22:17 +03:00
interop_system_test.go core/test: add benchmark for storageFind 2021-07-12 14:20:45 +03:00
interops.go core: simplify interop functions 2021-05-12 13:30:01 +03:00
interops_test.go dao: drop network from DAO 2021-03-26 13:45:18 +03:00
native_contract_test.go dao: drop network from DAO 2021-03-26 13:45:18 +03:00
native_designate_test.go *: fix whitespace errors 2021-05-12 22:51:41 +03:00
native_gas_test.go core: do not allow NEP17 roundtrip in case of insufficient funds 2021-06-09 13:36:50 +03:00
native_ledger_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
native_management_test.go stackitem: remove Item/StackItem from function names 2021-07-06 19:56:23 +03:00
native_neo_test.go core: do not allow NEP17 roundtrip in case of insufficient funds 2021-06-09 13:36:50 +03:00
native_notary_test.go config: make MaxValidUntilBlockIncrement configurable 2021-05-17 13:43:03 +03:00
native_oracle_test.go stackitem: remove Item/StackItem from function names 2021-07-06 19:56:23 +03:00
native_policy_test.go native: allow to set candidate register price 2021-03-11 10:12:30 +03:00
nonnative_name_service_test.go examples: fix IPv6 bounds check 2021-05-28 11:31:09 +03:00
notary_test.go crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +03:00
oracle_test.go crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +03:00
prometheus.go stateroot: move state-root related logic to core/stateroot 2021-03-09 13:48:29 +03:00
stateroot_test.go crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +03:00
util.go *: remove dead code 2021-05-12 18:13:14 +03:00
util_test.go core: rename Neo.Crypto.CheckMultisig interop 2021-05-11 18:38:14 +03:00