Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
test push + concat in loop versus push a collection + concat with map
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0
Browser:
Firefox 150
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one month ago
Test name
Executions per second
multiple push + concat in a loop
5419849.0 Ops/sec
push destructured array + map concat in one call
4321263.0 Ops/sec
Tests:
multiple push + concat in a loop
const result = []; const entries = ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"]; entries.forEach(entry => result.push(entry + "c"));
push destructured array + map concat in one call
const result = []; const entries = ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"]; result.push(...entries.map(e => e + "c"));