ssz icon indicating copy to clipboard operation
ssz copied to clipboard

SIMD implementation for as-sha256

Open twoeths opened this issue 1 year ago • 0 comments

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:

  • on Mac M1 it's 10% - 20% faster
  • on a Hetzner node, it's 70% - 80% faster

twoeths avatar Mar 25 '24 03:03 twoeths