ChainSafe / ssz

Typescript implementation of Simple Serialize (SSZ)
https://simpleserialize.com/
Other
50 stars 19 forks source link

SIMD implementation for as-sha256 #356

Closed twoeths closed 4 months ago

twoeths commented 6 months ago

Is your feature request related to a problem? Please describe.

With simd supported in assembly script, we can use it to hash multiple inputs in parallel, especially the digest64() method

Describe the solution you'd like

Use simd instruction in assembly script, we can hash 4 different inputs at the same time which is respective to v128 data structure

Additional context

A POC is available in tuyen/digest_64_simd branch. Benchmark result: