Test name | Executions per second |
---|---|
join | 696.3 Ops/sec |
for loop concatenation | 400.3 Ops/sec |
<!--your preparation HTML code goes here-->
/*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++) {
a.push(Math.floor(Math.random() * 1000));
}
}
a.join('');
let b = '';
for(let j = 0; j < a.length; j++) {
b += a[j];
}