Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
wasm vs webcrypto
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Linux
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
wasm
0.0 Ops/sec
webcrypto
86647.7 Ops/sec
HTML Preparation code:
<script src="https://snack-x.github.io/wasm-works/modules/EventEmitter.js?v=1.0.0"></script> <script src="https://snack-x.github.io/wasm-works/modules/WasmSHA256.js?v=1.0.1"></script> <script src="https://snack-x.github.io/wasm-works/js/demo_sha256.js?v=1.0.1"></script>
Script Preparation code:
var data = new Uint32Array(1024); window.crypto.getRandomValues(data); var dataBuffer = new Uint8Array(data); data = String.fromCharCode.apply(null, dataBuffer); var sha256 = new WasmSHA256(); fetch("https://snack-x.github.io/wasm-works/modules/sha256.wasm?v=1.0.2") .then(res => res.arrayBuffer()) .then(buffer => { sha256.loadWasmBuffer(buffer); sha256.on("ready", onModuleReady); });
Tests:
wasm
console.log(sha256.hashString(data));
webcrypto
crypto.subtle.digest("SHA-256", dataBuffer ).then(function (hash) {console.log(hash);});