Repository navigation
perf: accelerate approximate cuts and selective wide prediction staging - #179
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
No public API, serialization, tree-walking or accumulation-order changes. Baseline is
5d4bd3758db72220e61c4d1a4b0f8cb09b20dd74, including #178.Before / after
One Rayon thread on a shared, virtualized x86-64 host. Rust 1.99.1 / LLVM 23.1.1, default CPU features, release opt-level 3, thin LTO, one codegen unit, no target-cpu override or CPU pinning. Do not compare absolute timings with earlier rounds on different hardware.
Five independently interleaved ABBA cycles, three measured samples per process: 30 samples from ten processes per binary per workload. No samples removed. Values are milliseconds; changes are latency changes, not universal throughput claims. P10–P90 is an interpolated sample range, not a confidence interval.
Prediction uses prepared DMatrix input and warm layout, including validation/output allocation. Training includes fresh matrix construction, metadata and training, without reusing matrix/bin caches; output checking is outside timing. Cold-layout runs include first-prediction layout construction, but not model decoding.
Dense weighted training improved in every confirmation block, by 17.8–46.4%. The 46.4% block had an unusually slow baseline and is retained rather than treated as an extra win; the other four blocks improved 17.8–23.2%. The matching identical-binary training control moved −1.45% pooled; unchanged histogram training moved +0.28%. The earlier full grid measured dense weighted training −18.3% and the two ~8%-used inference cases −69.2%/−51.0%.
Coverage and limits
Reproduction and rejected experiments
This PR commits source code only: four implementation files and four reproducible benchmark harness sources. No benchmark datasets, raw records, reports, binary archives or host metadata are added to git. Results are summarized here; complete evidence remains local.
Both binaries use identical harnesses. Checks require exact prediction/cut/model identities across binaries and thread counts; inference also uses an independent scalar tree-walk oracle.
Build baseline and candidate with Rust 1.99.1 and the same resolved dependencies,
default CPU features and release profile (opt-level 3, thin LTO, one codegen unit,
panic=abort, no target-cpu override). Copy the candidate's two benchmark examples
to baseline first. Use separate target directories and copy the ignored root
Cargo.lock between builds; do not commit it. Build serially, stop other local
builds/tests, then run the scripts serially. Example relative worktree layout:
For each of five confirmation cycles, run quantile cases approx_dense,
approx_unit, approx_missing, hist_control with one thread and three repeats;
then inference cases w256_p8_d4_t10_b16_missing,
w1024_p8_d8_t100_b10000_missing, w1024_p1_d4_t10_b256 with the same settings;
then approx_dense with the identical baseline executable for both labels.
Use a fresh output directory each time. The runners write local metadata alongside the measurements; inspect and
minimize those outputs before sharing. Generated outputs are not committed.
Rejected/constrained experiments: uncleared quantile-summary scratch had no reliable end-to-end gain; unconditional radix regressed duplicate-heavy training about 46% and ordered cuts 2–3×; collect-and-sort slot discovery regressed a cold deep-model case 18–25% before bounded bitmap discovery. No scheduling change is included. Rejected experiments are summarized only. Every final-code timing sample and same-binary control is retained locally, not committed.
Validation