cheatfate / nimcrypto

Nim cryptographic library
MIT License
189 stars 23 forks source link

double keccak speed #80

Closed arnetheduck closed 1 month ago

arnetheduck commented 1 month ago

https://github.com/nim-lang/Nim/issues/23688 causes the implementation to fall into the when nimvm versions of THETA1, CHI etc - these operate on openArray and get interspersed with range checks and other random inefficiencies.

This fix doubles the speed of the 256-bit keccak.

cheatfate commented 1 month ago

I think it should affect any keccak version, not only 256-bit?

arnetheduck commented 1 month ago

I think it should affect any keccak version, not only 256-bit?

yes - I just didn't measure them.