Closed ferranbt closed 2 years ago
This PR refactors the merkleizer logic using ideas from here. The new workflow is much simpler and has fewer code paths.
It speeds up the hashing by 10%.
Old
BenchmarkHashTreeRootFast BenchmarkHashTreeRootFast-8 22938 52014 ns/op 0 B/op 0 allocs/op
New
BenchmarkHashTreeRootFast BenchmarkHashTreeRootFast-8 24508 45571 ns/op 0 B/op 0 allocs/op
This PR refactors the merkleizer logic using ideas from here. The new workflow is much simpler and has fewer code paths.
It speeds up the hashing by 10%.
Old
New