Skip to content

Inefficient executeHashComputations of hashtree #479

@twoeths

Description

@twoeths

benchmark does not show great executeHashComputations() performance on Linux, for example in https://github.com/ChainSafe/ssz/actions/runs/14090676972/job/39466309168

hashtree
    ✔ getHashComputations                                                 369.1343 ops/s    2.709041 ms/op   x1.226        119 runs   12.2 s
    ✔ executeHashComputations                                             100.3185 ops/s    9.968249 ms/op   x0.[90](https://github.com/ChainSafe/ssz/actions/runs/14090676972/job/39466309168#step:6:91)5         50 runs   4.91 s
    ✔ get root                                                            65.38101 ops/s    15.29496 ms/op   x1.030         12 runs   2.27 s

executeHashComputations is only 50% faster than get root, on our typical Linux node it's only 30% faster

however on my Macbook, it's 150% faster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions