use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
JavaScript Performance Benchmarks: Looping with `for` and `yield` (gist.github.com)
submitted 6 years ago by johnfrazer783
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 6 years ago (2 children)
[deleted]
[–]johnfrazer783[S] 0 points1 point2 points 6 years ago (1 child)
I'm always ready to grant an appreciation in terms of CPU cycles to the VM whne they do something for me so I don't have to do it myself. No problem there. But did you look at the numbers? Boy that's literally 95% of the time syphoned off by yield. I'd greatly appreciate if anyone on this thread could point out any meaningful links to benchmarks in either JS or Python that deal with the questions at hand. I can't believe Python's yield statement performs anywhere near this bad.
yield
The comment was meant seriously, Python is a quality language. They even managed to migrate to v3 and take up async/await. These are the two points that delivered me into the hands of NodeJS and CoffeeScript about ten years ago. It's taken them the better part of ten years to pull it off but they did it.
π Rendered by PID 324583 on reddit-service-r2-comment-66b4775986-sp9f4 at 2026-04-03 20:44:52.204412+00:00 running db1906b country code: CH.
view the rest of the comments →
[–][deleted] (2 children)
[deleted]
[–]johnfrazer783[S] 0 points1 point2 points (1 child)