Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Joining strings 4
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser:
Chrome 133
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
join
85.5 Ops/sec
for loop concatenation
90.0 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:*/ const a = []; async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); for(let i = 0; i < 100000; i++) { const x = Math.floor(Math.random() * 1000); const y = Math.floor(Math.random() * 1000); a.push({ x, y }); } }
Tests:
join
let g = 'M'; for(let point of a) { const x = point.x.toFixed(0); const y = point.y.toFixed(0); g += x + ',' + y + ' '; }
for loop concatenation
let b = 'M'; for(let j = 0; j < a.length; j++) { const point = a[j]; const x = point.x.toFixed(0); const y = point.y.toFixed(0); b += x + ',' + y + ' '; }