10 ms·
Cool. I recently wrote a low-level sha1 implementation in pure javascript, trying to leverage asm.js (http://github.com/srijs/rusha http://github.com/srijs/rush
by srijs 13y ago
Cool. I recently wrote a low-level sha1 implementation in pure javascript, trying to leverage asm.js (http://github.com/srijs/rusha http://github.com/srijs/rusha).
Can you tell me, how did you confirm you wrote valid asm.js and there was no fallback-mechanism kicking in?
I benchmarked my implementation, of course, and noticed a 2x speedup. However, this seems quite less for the this type of low-level algorithm...
- abecedarius 13y agoOpen the error console (via the Web Developer menu item) and you'll see messages there. Success shows up as "Error: successfully compiled asm.js code." :-) P.S. Looking at your code, I can tell it's not asm.js conformant yet, though it should just be a bunch of small tweaks (e.g. an expression like (a+b) will need to be (a+b)|0, etc.).
- srijs 13y agoThank you. I just updated my code and it's really within half of native speed now... (benchmarks in the README, if any of you are interested) asm.js is very exciting technology!
- abecedarius 13y agoYou're welcome!