asmcrypto / asmcrypto.js

JavaScript Cryptographic Library with performance in mind.
MIT License
659 stars 182 forks source link

Small optimization #130

Closed Killfrra closed 6 years ago

Killfrra commented 6 years ago

Inspired by Brian Gladman's http://brg.a2hosted.com/oldsite/cryptography_technology/sha/

vibornoff commented 6 years ago

Does it really makes sense?

Killfrra commented 6 years ago

Theoretically yes. Here are some tests https://jsperf.com/fast-sha256-comparsion/7 Also it should be smaller. In my build (only sha256) it's 46,9kB vs 44,1kB