Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Test array ops
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0
Browser:
Firefox 134
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Test 1
2521.3 Ops/sec
Test 2
175.7 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
Test 1
/*When writing async/deferred tests, use `deferred.resolve()` to mark test as done*/ const arr = new Array(10000).fill(0).map(_ => Math.random()) const typed = Float64Array.from(arr) const windowSize = 5000; let sums = []; for(let start = 0; windowSize + start < arr.length; start++) { const window = typed.subarray(start, windowSize+start) sums.push(window[100]) }
Test 2
const arr = new Array(10000).fill(0).map(_ => Math.random()) const windowSize = 5000; let sums = []; for(let start = 0; windowSize + start < arr.length; start++) { const window = arr.slice(start, windowSize + start) sums.push(window[100]) }