Open luca992 opened 1 year ago
Oooooh yeah that’s not great. We should look at JS-language implementations of SHA256 and see what types they’re using.
Hi @luca992 and @swankjesse,
I've observed the performance challenges with Sha512 in JS, particularly around the emulation of 64-bit integers. I'm keen to dive deeper and work on alternatives like leveraging Double for the JS target or referencing best practices from existing JS SHA256 implementations.
Could I be assigned to this issue?
Thanks, Lisi
We’re not actively seeking new contributors to this project at the moment. If you’d like to offer advice or code, please do! But I don’t want to promisee that we’re going to accept your work when you’re done.
Sha512 performance is very slow on JS due to it using Long numbers.
JS does not have 64-bit integers, so Kotlin/JS has to emulate them. Which causes so much overhead on JS that when I run
Sha512
on my web app it causes my entire web app to freeze for a few seconds:If possible, could
Sha512
be ported to useDouble
for the JS target? Which are much much faster