Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
hash-wasm vs Web Crypto API
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1
Browser:
Mobile Safari 26
Operating system:
iOS 18.6
Device Platform:
Mobile
Date tested:
9 months ago
Test name
Executions per second
wasm sha256
121441.0 Ops/sec
webcrypto sha256
1042195.7 Ops/sec
wasm sha1
150536.7 Ops/sec
webcrypto sha1
909726.1 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/hash-wasm@4"></script>
Script Preparation code:
var data = new Uint32Array(1024); window.crypto.getRandomValues(data); var dataBuffer = new Uint8Array(data); data = String.fromCharCode.apply(null, dataBuffer);
Tests:
wasm sha256
console.log(hashwasm.sha256(data));
webcrypto sha256
crypto.subtle.digest("SHA-256", dataBuffer).then(function (hash) {console.log(hash);});
wasm sha1
console.log(hashwasm.sha1(data));
webcrypto sha1
crypto.subtle.digest("SHA-1", dataBuffer).then(function (hash) {console.log(hash);});