Hash & Validate uses asm.js where available (only Firefox and it's derivatives right now) for increased performance.
I was curious what that actually meant in terms of time saved so I've decided to benchmark it against a couple of other browsers and native tools.
- Machine was a Core2Duo Mobile @ 2.66Ghz
- Test file was a 1.2 gigabyte Linux ISO, stored on local SSD
- openssl and the crc32 tool included in Ubuntu were used for the native test
- Results are averages of multiple measurements
MD5 being so much worse on Firefox without asm.js is a bit anomalous. My best guess is that it's probably because that module hasn't been optimized much and Firefox's JS engine doesn't auto-optimize something that the others do.
The new Opera and Chromium being almost identical is not a big surprise considering Opera's also a WebKit browser now. (I also tried Opera 12 but it took several minutes which would've looked silly on the chart)
The conclusion is that asm.js compiled modules far outperform regular JIT-compiled JS, as advertised.
Hashing time is significantly reduced even excluding the anomalous MD5 result:
- SHA1 done in 13 seconds ( 29 seconds without, 3.5 seconds native )
- SHA256 done in 19 seconds ( 33 seconds without, 8 seconds native )
- CRC32 done in 14 seconds ( 23 seconds without, 2.2 seconds native )
Site updates:Improvements to Hash & Validate
- Added option to hash text directly
- Validation failures now show the invalid hash as well instead of just "INVALID"
- Browser compatibility enhancements (older Android, IE, etc..)
- Workaround for a nasty bug in older JS engines