Created
July 28, 2023 02:00
-
-
Save paulgb/588e3657115fcefe1b1a51990f59e5a8 to your computer and use it in GitHub Desktop.
js iterator benchmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let m = {} | |
for (let i = 0; i < 50_000_000; i++) { m[i] = i } | |
let start = performance.now() | |
for (const _ in m) { | |
break | |
} | |
console.log(performance.now() - start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment