mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-16 07:14:15 +00:00
7b88bb3b30
Now that branches are small, we can add a branch cache that fits more verticies in memory by only storing the branch portion (16 bytes) of the VertexRef (136 bytes). Where the original vertex cache hovers around a hit rate of ~60:ish, this branch cache reaches >90% hit rate instead around block 20M which gives a nice boost to processing. A downside of this approach is that a new VertexRef must be allocated for every cache hit instead of reusing an existing instance - this causes some GC overhead that needs to be addressed. Nice 15% improvement nonetheless, can't complain! ``` blocks: 19630784, baseline: 161h18m38s, contender: 136h23m23s Time (total): -24h55m14s, -15.45% ```