Uh oh!
There was an error while loading. Please reload this page.
doc: add explanation why keep var with for loop in async_hooks - #30380
doc: add explanation why keep var with for loop in async_hooks#30380lrecknagel wants to merge 1 commit into
Conversation
Refs: nceu19-async_hooks This comment will help contributors to understand why keeping var
Trott
commented
Nov 12, 2019
Welcome, @lrecknagel and thanks for the pull request. I'm guessing this is from a Code + Learn event. I'm not sure the " |
mcollina
commented
Nov 12, 2019
This is an extremely tight loop in a code path that is hit a lot. |
Trott
commented
Nov 12, 2019
Cool. Let's see if we can get that information into the comment. As it reads now, it could encourage someone to go through and change all |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Trott
commented
Nov 12, 2019
I left two optional suggestions. It will save someone a little bit of |
nodejs-github-bot
commented
Nov 14, 2019
nodejs-github-bot
commented
Nov 26, 2019
gireeshpunathil
commented
Nov 26, 2019
This comment will help contributors to understand why keeping var PR-URL: #30380 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
gireeshpunathil
commented
Nov 26, 2019
landed in 4506991 |
This comment will help contributors to understand why keeping var PR-URL: #30380 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This comment will help contributors to understand why keeping var PR-URL: #30380 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This comment will help contributors to understand why keeping var PR-URL: #30380 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Aschen
commented
Jul 18, 2022
👋 Just passing by here and I was curious so I ran some benchmarks if anyone is curious about this. At the time of Node.js 6 it was a real performance gain but nowadays it's almost the same |

Refs: nceu19-async_hooks
This comment will help contributors to understand why keeping var in some for loop instead changing at to let, as discussed with @mcollina
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes