-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace decoded payload key with encoded key buf
Reduce data held in RAM by dozens of GB, reduce allocs, and improve speed of: ledger update, checkpoint serialization, and rebuilding Mtrie at startup by: - keeping mtrie leaf node's payload key encoded in memory - using encoded key directly while serializing checkpoint/WAL/TrieProof - using encoded key directly while deserializing checkpoint/WAL/TrieProof Benchmark is only for TrieUpdate. Other improvements are not benchmarked yet. name old time/op new time/op delta TrieUpdate-4 439ms ± 2% 409ms ± 1% -6.94% (p=0.000 n=18+20) name old alloc/op new alloc/op delta TrieUpdate-4 73.5MB ± 0% 34.1MB ± 0% -53.60% (p=0.000 n=20+20) name old allocs/op new allocs/op delta TrieUpdate-4 187k ± 0% 147k ± 0% -21.44% (p=0.000 n=20+20)
- Loading branch information
Showing
3 changed files
with
70 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters