Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Using at() vs [offset + n] for multiple assignment
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Assignment with offsets
14261388.0 Ops/sec
at()
83886.6 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var array = new Float32Array(1000);
Tests:
Assignment with offsets
const length = array.length / 5; for (let i = 0; i < length; i+=5) { array[i + 0] = 1; array[i + 1] = 3; array[i + 2] = 3; array[i + 3] = 7; array[i + 4] = 5; }
at()
const length = array.length / 5; for (let i = 0; i < length; i+=5) { array.at([1, 3, 3, 7, 5], i); }