status-im / nim-blscurve

Nim implementation of BLS signature scheme (Boneh-Lynn-Shacham) over Barreto-Lynn-Scott (BLS) curve BLS12-381
Apache License 2.0
26 stars 11 forks source link

Update BLST #86

Closed mratsim closed 3 years ago

mratsim commented 3 years ago

This updates BLST from commit Reference diff:

State

mratsim commented 3 years ago

The speedup with BLST SHA256 is 14x~15x

image

In particular hashTreeRoot is one of our bottleneck in NBC and the BeaconState is 5MB

arnetheduck commented 3 years ago

is that using some fancy instructions or plain code?

mratsim commented 3 years ago

With SSE3 for vectorized xor, shuffles and vectorized shift right:

https://github.com/supranational/blst/blob/master/build/elf/sha256-x86_64.s#L359-L362

This is portable to ARM since they have equivalent vector instructions.