- Fix stack overflow. This was due to the use of the lazy
Map.foldinstead of its strict version
- Make sure benchmark data does not have unexpected thunks.
- Define a function that updates the ballot based on the key hash of the voter.
- Set the heap limit for benchmarks to a very large value.
- Have repeated measurements with revised code
- Add a note stating that the memory used by running the tally is not much more than the memory required for storing the participants hashes in a map.
generate nix artifacts
Hashing: change the representation of Hash to ShortByteString
Change AbstractHash from being a newtype over Digest to a newtype over ShortByteString and adjust the conversion functions.
The ShortByteString type has efficient Eq & Ord instances whereas the Digest type has very inefficient ones.
Previously the Digest comparison loop was near the top of the profile while doing a bulk sync. This representation change is an improvement of ~7% in the time to validate the whole chain.
Hashing: remove ByteArrayAccess instance
It exposes too much and constraints the choice of representation.
It was only used by the ByteArrayAccess instance for MerkleRoot which itself was unused after the recent changes to use hash conversion utility functions.