Repository navigation
Conversation
Assisted-by: claude:opus-5.5 Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
V8 has a fast path for `{ value, done }` literals, but it must be that order.
Also, the ES spec technically requires that order.
Assisted-by: claude:opus-5.5
Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
Apply the iterator-result-value-first lint fixer. Assisted-by: claude:opus-5.5 Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
|
Review requested:
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #66837 +/- ##
==========================================
- Coverage 92.85% 90.49% -2.36%
==========================================
Files 428 797 +369
Lines 194833 277793 +82960
Branches 30108 53361 +23253
==========================================
+ Hits 180907 251399 +70492
- Misses 13599 16801 +3202
- Partials 327 9593 +9266
🚀 New features to boost your workflow:
|
|
FYI @jasnell as the original discussion was in #63521 (comment) (also linked in PR description #63526) |
LiviaMedeiros
left a comment
There was a problem hiding this comment.
The performance boost looks promising. Is this applicable to IterResult?
This comment was marked as off-topic.
This comment was marked as off-topic.
Assuming you mean this one, no, the objects it creates have a different prototype (to avoid |
LiviaMedeiros
left a comment
There was a problem hiding this comment.
Assuming you mean this one, no, the objects it creates have a different prototype (to avoid
Object.prototype.thenpollution) and so cannot share the V8 map.
I wonder if reordering it purely for the sake of consistency would be worth the churn. Probably not (or at least not in the scope of this PR) so LGTM as is.
Spec requires this order, plus V8 optimizes it and not the reverse; as such this has some performance benefits (in this microbenchmark).
cc @trivikr since you added the lint rule enforcing the opposite order in #63526.