this post was submitted on 19 Feb 2026
0 points (50.0% liked)
JavaScript
2679 readers
13 users here now
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Well that depends, generators are faster than loops when you're using Bun or Node.
Bro, how are generators going to be faster?
This is an AI article.
My results:
Firefox:
Node (uses same engine as deno, chrome, edge):
Safari (uses same engine as bun):
Bun (same engine as Safari but without needing to apologise for Safari):
Generators are going to be slow because:
Until generators don't rely on stack switching, they're always going to be super slow.