Skip to content

Move UnstableFn containers to sequence storage - #984

Draft
ezrosent wants to merge 1 commit into
codex/inline-containers-10-pairfrom
codex/inline-containers-11-unstable-fn
Draft

Move UnstableFn containers to sequence storage#984
ezrosent wants to merge 1 commit into
codex/inline-containers-10-pairfrom
codex/inline-containers-11-unstable-fn

Conversation

@ezrosent

@ezrosent ezrosent commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Encode UnstableFn values as self-describing sequences containing the opaque descriptor, argument count, rebuild masks, and partial arguments.
  • Rebuild argument lanes without resolving the descriptor through BaseValues.
  • Add prepared functions that resolve and copy partial arguments once for repeated higher-order callbacks.
  • Cover multiword masks, malformed encodings, descriptor-free rebuilds, nested dirty propagation, and application after rebuild.

Stack

Draft, stacked on #983. This is PR 11 of 12 in the sequence-backed container stack.

Validation

Validated on the complete 12-commit stack:

  • cargo nextest run --workspace: 1,362 tests passed
  • cargo test --workspace --doc
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.38298% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.42%. Comparing base (7cdb234) to head (49c0d64).

Files with missing lines Patch % Lines
src/sort/fn.rs 97.69% 8 Missing ⚠️
src/exec_state.rs 82.14% 5 Missing ⚠️
core-relations/src/containers/sequence.rs 84.00% 4 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                         @@
##           codex/inline-containers-10-pair     #984      +/-   ##
===================================================================
- Coverage                            87.66%   87.42%   -0.25%     
===================================================================
  Files                                   98       98              
  Lines                                39484    39852     +368     
===================================================================
+ Hits                                 34614    34840     +226     
- Misses                                4870     5012     +142     

☔ 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-hq

codspeed-hq Bot commented Aug 5, 2026

Copy link
Copy Markdown

Merging this PR will regress 4 benchmarks

⚠️ 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 improved benchmarks
❌ 4 regressed benchmarks
✅ 26 untouched benchmarks
⏩ 227 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation tests[python_array_optimize] 1.1 s 1.3 s -14.59%
Simulation tests[eggcc-2mm] 7.7 s 8.5 s -9.46%
Simulation tests[typeinfer] 114.9 ms 126.7 ms -9.35%
Simulation tests[luminal-llama] 504.4 ms 553.9 ms -8.94%
Simulation tests[repro-665-set-union] 602 ms 113.8 ms ×5.3
Simulation rust_rule_insert_loop[ops1000_funcs0] 632.8 µs 584 µs +8.36%
Simulation rust_rule_insert_loop[ops1000_funcs200] 671.1 µs 623.1 µs +7.71%
Simulation rust_rule_insert_loop[ops100000_funcs2000] 50 ms 46.4 ms +7.7%
Simulation rust_rule_insert_loop[ops1000_funcs2000] 912.3 µs 851.5 µs +7.14%
Simulation rust_rule_insert_loop[ops100000_funcs200] 50.3 ms 47.2 ms +6.61%
Simulation rust_rule_insert_loop[ops100000_funcs0] 50.3 ms 47.2 ms +6.5%

Tip

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


Comparing codex/inline-containers-11-unstable-fn (49c0d64) with main (716c320)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/inline-containers-10-pair (7cdb234) during the generation of this report, so main (716c320) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@ezrosent
ezrosent force-pushed the codex/inline-containers-11-unstable-fn branch from 49c0d64 to 3be29f9 Compare August 6, 2026 05:34
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.

2 participants