emn178/js-md5

Speed comparison

caub opened this issue · 6 comments

caub commented

just did this https://jsfiddle.net/crl/6uaktq3s/ that shows that your lib is the fastest around, and deserve more credit

Thanks for sharing the speed comparison demo @caub!

I wasn't convinced by "way slower" so I've uncommented some code to find out that pvorb aka node-md5 is about 50 times slower (10MB test file, 3-yo MBP).

I believe it could make many developers life easier if this package included a speed comparison table in the README file.

Confirm.
It's works 6-7 times faster than plain old CryptoJS, or md5.js (with over 8kk weekly downloads).
~30 seconds vs ~193 seconds for 3.96 GB file (for little files it works the same way too, but may be no such fast)

I think it's due to the using of Uint32Array. But will this code work on Big-Endian machines?

will this code work on Big-Endian machines?

I tested it on qemu ppc64 and it produced wrong results as expected.

It's was used in a browser (Do they work fine in BE-machines?), or in Node.js?

caub commented

Which libs are broken on Big-Endian machines?