Commit 484bddf
Optimize keySet() and values() to avoid unnecessary entrySet() rebuild
values() now iterates buckets directly, skipping expensive reconstructKey()
and SimpleEntry allocation entirely. keySet() iterates buckets directly,
avoiding SimpleEntry wrapper allocation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 089216a commit 484bddf
2 files changed
Lines changed: 38 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3563 | 3563 | | |
3564 | 3564 | | |
3565 | 3565 | | |
3566 | | - | |
3567 | | - | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
3568 | 3592 | | |
3569 | 3593 | | |
3570 | 3594 | | |
| |||
3580 | 3604 | | |
3581 | 3605 | | |
3582 | 3606 | | |
3583 | | - | |
3584 | | - | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
3585 | 3616 | | |
3586 | 3617 | | |
3587 | 3618 | | |
| |||
0 commit comments