Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Placeholder Generator
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
0 - 999
22710.2 Ops/sec
0 - 9999
2345.1 Ops/sec
0 - 99999
213.1 Ops/sec
0 - 999999
20.6 Ops/sec
Script Preparation code:
function* placeHolders(array) { if (array.every(n => n === 0)) array.unshift(1); let total = Number(array.join("")); for (let i = 0; i < total; i++) yield i; }
Tests:
0 - 999
[...placeHolders([0, 0, 0])]
0 - 9999
[...placeHolders([0, 0, 0, 0])]
0 - 99999
[...placeHolders([0, 0, 0, 0, 0])]
0 - 999999
[...placeHolders([0, 0, 0, 0, 0, 0])]