Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JavaScript with
Compare With to inline array mutation
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
array.with(1, "newUser");
528.3M/s
Array.toReversed()
17.4M/s
View exact numbers
Test name
Executions per second
✓
array.with(1, "newUser");
528,332,256 Ops/sec
Array.toReversed()
17,426,220 Ops/sec
Script Preparation code:
array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
Tests:
array.with(1, "newUser");
array[1] = "newUser";
Array.toReversed()
array.toReversed();