-
-
Notifications
You must be signed in to change notification settings - Fork 161
perf(runtime): keep the migrated key index instead of dropping it (populated delete −36.2%) #9005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| `delete obj[k]` stops rebuilding the shape key index — for real this time. | ||
|
|
||
| #9002 shifted the index onto the post-delete keys array, but the delete tail | ||
| ends with `shape_drop` on that same array, so the migrated index was discarded | ||
| immediately and the next lookup rebuilt it by re-hashing every surviving key | ||
| name. (#9002's own measured win came from pruning the STALE old entry, not | ||
| from preserving a usable index; its description has been corrected.) | ||
|
|
||
| A migrated index is *shifted to match* the compacted array, so it is current, | ||
| not stale. Skipping the drop when the migration succeeded is what actually | ||
| stops the rebuild. Everything else is unchanged: a partially built index, or a | ||
| delete that took another path, still drops exactly as before. | ||
|
|
||
| Interleaved A/B, min-of-15 at quiet load (~1.0): `bench_populated_delete` | ||
| 4361 → **2781 ms, −36.2%** (mean −36.2%). Combined overwrite and | ||
| realistic-name read unchanged. | ||
|
|
||
| Cumulative across #9000–#9003 and this: **5938 → 2781 ms, −53.2%** on perry's | ||
| worst object-model gap. Suite 2787 passed, no warnings; adversarial property | ||
| differential byte-identical to node. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Format the issue reference as inline text.
Line 3 starts with
#9002, which triggers markdownlint MD018. Wrap the reference in backticks so it remains prose and the lint warning is removed.Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 3-3: No space after hash on atx style heading
(MD018, no-missing-space-atx)
🤖 Prompt for AI Agents
Source: Linters/SAST tools