-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This avoids the memory overhead that a regular strict `ByteString` has. According to the [Haddocks of `ShortByteString`][SBS], using a `ByteString` (unshared) for a 32 byte hash (which is the case for Byron and Shelley) requires 72 + 32 bytes, but a `ShortByteString` requires only 32 + 32 bytes. This can make a noticeable difference in memory usage as we're keeping lots of hashes in memory: * O (k) in the in-memory indices of the VolatileDB (hash and prev hash) * O(cached epochs * epoch size) in the secondary index caches of the ImmutableDB * ... [SBS]: http://hackage.haskell.org/package/bytestring-0.10.10.0/docs/Data-ByteString-Short.html#g:2
- Loading branch information
Showing
5 changed files
with
14 additions
and
14 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
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