Skip to content

Add small residual join indexes - #993

Draft
ezrosent wants to merge 1 commit into
codex/packed-join-abstractionsfrom
codex/packed-trie-split-01-residual-index
Draft

ezrosent wants to merge 1 commit into
codex/packed-join-abstractionsfrom
codex/packed-trie-split-01-residual-index

Conversation

@ezrosent

@ezrosent ezrosent commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

This PR is part of an eight-PR stack that jointly replaces #959.

Stack base: #969

Replacement stack:

  1. Add small residual join indexes #993 — small residual indexes
  2. Add packed join root caches #994 — packed root caches
  3. Add prepared join index state #995 — prepared index state
  4. Add packed join probe abstractions #996 — packed probe abstractions
  5. Add join-tail execution state #997 — join-tail execution state
  6. Use packed arena tries for generic joins #998 — executor integration
  7. Compact buffered free-join updates #999 — compact frame updates
  8. Lazily prepare packed join state #1000 — lazy preparation

Validation on the complete stack:

  • cargo fmt --check
  • cargo nextest run -p egglog-core-relations
  • 113 tests passed

Layer 1 of 8.

Adds allocation-free residual index primitives in a dedicated implementation file. The executor wiring is intentionally deferred to #998 so this abstraction can be reviewed separately.

Non-test diff: +283 / -0.

@codecov-commenter

codecov-commenter commented Aug 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (codex/packed-join-abstractions@8e85a68). Learn more about missing BASE report.

Additional details and impacted files
@@                        Coverage Diff                        @@
##             codex/packed-join-abstractions     #993   +/-   ##
=================================================================
  Coverage                                  ?   87.35%           
=================================================================
  Files                                     ?       96           
  Lines                                     ?    32389           
  Branches                                  ?        0           
=================================================================
  Hits                                      ?    28295           
  Misses                                    ?     4094           
  Partials                                  ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 8.8%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 7 regressed benchmarks
✅ 30 untouched benchmarks
⏩ 227 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ rust_rule_insert_loop[ops100000_funcs2000] 48.8 ms 54.3 ms -10.2%
❌ rust_rule_insert_loop[ops100000_funcs0] 49.2 ms 54.6 ms -10.01%
❌ rust_rule_insert_loop[ops100000_funcs200] 49.1 ms 54.4 ms -9.69%
❌ rust_rule_tableaction_hot_path[facts50000_funcs200] 25.7 ms 28 ms -8.45%
❌ rust_rule_insert_loop[ops1000_funcs2000] 627.5 µs 681.3 µs -7.9%
❌ rust_rule_insert_loop[ops1000_funcs0] 622.9 µs 675.2 µs -7.75%
❌ rust_rule_insert_loop[ops1000_funcs200] 636 µs 688.1 µs -7.57%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing codex/packed-trie-split-01-residual-index (1e5392d) with codex/packed-join-abstractions (7faf41b)2

Open in CodSpeed

Footnotes

  1. 227 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on codex/packed-join-abstractions (8e85a68) during the generation of this report, so 9537fab was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

Comment thread core-relations/src/free_join/residual_index.rs Outdated
Comment thread core-relations/src/free_join/residual_index.rs Outdated
Comment thread core-relations/src/free_join/residual_index.rs Outdated
Comment thread core-relations/src/free_join/residual_index.rs
@ezrosent
ezrosent force-pushed the codex/packed-trie-split-01-residual-index branch from 8f5b779 to 785b85c Compare August 17, 2026 05:41

@yihozhang yihozhang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can address the nits in the end with a different PR if that's easier.

Comment thread core-relations/src/free_join/residual_index.rs Outdated
Comment thread core-relations/src/free_join/residual_index.rs Outdated
@ezrosent
ezrosent force-pushed the codex/packed-trie-split-01-residual-index branch from 785b85c to 8c76e13 Compare September 14, 2026 05:01
@ezrosent
ezrosent removed this pull request from stack #1001 September 16, 2026 04:35
@ezrosent
ezrosent added this pull request to stack #1025 September 16, 2026 04:36
@ezrosent
ezrosent force-pushed the codex/packed-trie-split-01-residual-index branch from 8c76e13 to 1e5392d Compare September 18, 2026 05:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants