state.balances
These benchmarks involve getting a recent mainnet BeaconState
(slot 1783731
) and then deriving two BeaconState
objects:
state.balances
entries have been incremented by 1
. The changes are evenly distributed across the state.balances
array.Then, for each state, we perform a cached tree-hash (with an already initialized cache). Results:
Here, the difference is 1.47 ms. However, the differences vary across runs, it is generally within 1-2ms.
Caveat: cached tree hashing uses parallelization and the timings are highly dependent on the speed and availability of the CPU. So, whilst the increase here is 4%, mileage will vary. This test was conducted on a hex-core i7 running many other applications.
Source code for bench: https://github.com/paulhauner/lighthouse/blob/paul-altair-benches/consensus/types/benches/altair_balance_changes.rs