Skip to content

Compress ZJIT type-profile buckets - #1112

Closed
efegokdemir wants to merge 1 commit into
Shopify:masterfrom
efegokdemir:efe/zjit-compressed-profiles-1103
Closed

efegokdemir wants to merge 1 commit into
Shopify:masterfrom
efegokdemir:efe/zjit-compressed-profiles-1103

Conversation

@efegokdemir

Copy link
Copy Markdown

Store a single observed type inline and allocate bucket storage only when a profile becomes polymorphic. This keeps the common case compact and lets GC traverse only observed types while preserving the existing ordered summary API. The focused layout check measures 48 bytes instead of 152 for a distribution with a 16-byte type.

cargo check --tests, cargo clippy --all-targets --all-features, and the focused distribution.rs test harness (15 tests) pass. The full ZJIT runtime suite was not run because this checkout lacks libminiruby.a and cargo-nextest, and a Ruby build risks exceeding the 1 GB task limit.

Part of #1103.

Keep monomorphic profiles inline and allocate bucket storage only when multiple types are observed. This reduces per-profile memory and avoids scanning empty buckets.

Implements Shopify#1103.
@github-actions github-actions Bot added the jit label Nov 7, 2026
@tekknolagi

Copy link
Copy Markdown

Please file PRs to ruby/ruby.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants