Re:Code optimizations when using async/await
by darksaints on Tuesday January 04, 2022 @11:22AM
(#29796520)
That can cut both ways. Sometimes optimizations reduce legibility even for advanced programmers, and often for very marginal improvements in performance...or no improvement in performance at all because they're not on the critical path. Sometimes it's okay to make code slower but more obvious as to what it is doing.
[ Parent
| on HN ]
Re:Code optimizations when using async/await
by hinkley on Tuesday January 04, 2022 @12:11PM
(#29797105)
Variable hoisting can make a loop faster and the intentions clearer. As long as you don’t hoist the variable entirely off the page, that is. Declaring at the top of a large scope is confusing. I think people got that from older versions of C as I recall. It’s worse than doing nothing.