Repository navigation
Commit ad6f609
Short-circuit no-op remove() comparisons by identity before equals()
The equals() calls that replaced identity comparisons (they are what makes
no-op removal results safe to memoize) have no identity fast path of their
own, and a no-op removeFalsey() is the common case on the assignment hot
path. Checking identity first restores the cheap path without relying on
remove()'s same-instance behavior as a contract.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVQhbBxDjDVAVeJVvLpWYE1 parent cfc4fbb commit ad6f609
2 files changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
469 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
| |||
0 commit comments