Repository navigation
v0.5.2
943 Bytes (-12)
- ⚡ Optimize & Eliminate JIT Deopt: Simplified
inputToWordsand output formatting. Replaced the old big-endian JS bitwise loop with native TypedArray.reverse(), completely eliminating JIT deoptimization (bailout) risks and keeping type feedback clean and monomorphic. - 📊 Benchmark:
- Added
spark-md5to benchmarks. - Fixed
js-md5silently delegating tonode:cryptoin Node.js, ensuring a fair pure-JS benchmark. tinyhmacmd5remains the fastest pure-JS MD5 / HMAC-MD5 implementation.
- Added
- 📝 Updated package description: "A tiny, fast and reliable implementation of MD5 and HMAC-MD5 for JavaScript."
> pnpm benchmark
$ node scripts/benchmark.mjs && node scripts/test-513MiB.mjs
Data length: 104857600 chars (100MiB)
--------------------------------------------------
tinyhmacmd5 : 388.45 ms
spark-md5 : 520.13 ms
js-md5 : 480.29 ms
crypto-js : 1661.32 ms
blueimp-md5 : 3749.15 ms
node:crypto : 129.97 ms
--------------------------------------------------
✅ All pure JS implementations match node:crypto result.
--- Pure 513MiB Test (No prior small tests) ---
tinyhmacmd5 HMAC-MD5 timer: 1.867s
node:crypto HMAC-MD5 timer: 548.332ms
tinyhmacmd5 MD5 timer: 1.869s
node:crypto MD5 timer: 551.244ms
Full Changelog: v0.5.1...v0.5.2