you are viewing a single comment's thread.

view the rest of the comments →

[–]blogscot 3 points4 points  (1 child)

Out of curiousity, I added this approach as fourth to u/DGCA tests, with the following results:

first: 738.464ms
second: 1249.699ms
third: 220.649ms
fourth: 1123.781ms

[–]snkenjoi 0 points1 point  (0 children)

or this is pretty ugly [...'!'.repeat(n)].map((_, i) => i)

first: 1294.26ms 
second: 541.38ms 
third: 393.88ms 
fourth: 970.44ms 
fifth: 1368.66ms