Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Placeholder Generator
(version: 1)
Comparing performance of:
0 - 999 vs 0 - 9999 vs 0 - 99999 vs 0 - 999999
Created:
one year ago
by:
Registered User
Jump to the latest result
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])]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
0 - 999
0 - 9999
0 - 99999
0 - 999999
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
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/OS:
Chrome 131 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
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
Related benchmarks:
== vs === v3
for [i,j] big/small
`${num}` vs ""+number vs .toString()
For with variable 4
[i] vs .at(i)
test +0
Set replace
12132132132131243214124
i++ ++i i += 1
Comments
Confirm delete:
Do you really want to delete benchmark?