neoneo-go/pkg/core/storage
Anna Shaleva 191cc45032 core: sort items in MemoryStore.Seek
MemoryStore is used in a MemCachedStore as a persistent layer in tests.
Further commits suppose that persistent storage returns sorted values
from Seek, so sort the result of MemoryStore.Seek.

Benchmark results for 10000 matching items in MemoryStore compared to
master:
name          old time/op    new time/op    delta
MemorySeek-8     712µs ± 0%    3850µs ± 0%   +440.52%  (p=0.000 n=8+8)

name          old alloc/op   new alloc/op   delta
MemorySeek-8     160kB ± 0%    2724kB ± 0%  +1602.61%  (p=0.000 n=10+8)

name          old allocs/op  new allocs/op  delta
MemorySeek-8     10.0k ± 0%     10.0k ± 0%     +0.24%  (p=0.000 n=10+10)

For details on implementation efficiency see the
https://github.com/nspcc-dev/neo-go/pull/2193#discussion_r722993358.
2021-10-21 10:05:12 +03:00
..
badgerdb_store.go storage: introduce PutChangeSet and use it for Persist 2021-08-12 17:42:16 +03:00
badgerdb_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
boltdb_store.go storage: introduce PutChangeSet and use it for Persist 2021-08-12 17:42:16 +03:00
boltdb_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
leveldb_store.go storage: introduce PutChangeSet and use it for Persist 2021-08-12 17:42:16 +03:00
leveldb_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
memcached_store.go core: distinguish storage.KeyValue and storage.KeyValueExists 2021-10-21 10:05:12 +03:00
memcached_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
memory_store.go core: sort items in MemoryStore.Seek 2021-10-21 10:05:12 +03:00
memory_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
redis_store.go storage: introduce PutChangeSet and use it for Persist 2021-08-12 17:42:16 +03:00
redis_store_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00
store.go core: allow to recover after state jump interruption 2021-09-07 19:43:27 +03:00
store_config.go storage: add support of BadgerDB 2020-04-09 13:55:59 +03:00
store_test.go native: move contract deployment to management contract 2020-12-14 15:23:46 +03:00
storeandbatch_test.go core: add benchmarks for iterator.Next, MemCached.Seek, Mem.Seek 2021-10-21 10:05:12 +03:00