Open
Description
Currently, the sha256
, sha512
and hash160
functions are written in Wat in the standard. This implementation however brings a few optimization issues:
- The code for those functions is included in the standard and always copied to the generated binaries
- Both those functions need a large array of magic number for their internal operations which are always present in the linear memory
- The functions are written to be as short as possible, but would be way more efficient if we unrolled the loops, remove the Simd instructions, remove the internal function calls, remove the
call_indirect
, ...
We should reimplement them with walrus to generate once when needed those standard functions, write the magic numbers in memory and have all the optimizations and more from point 3.
-
sha256
-
sha512
-
hash160
Metadata
Assignees
Type
Projects
Status
Status: 🆕 New
Activity