Repository navigation
perf(partitions): a data object's Adler-32 is summed in place with SIMD (B80) - #695
Merged
Merged
Conversation
…MD (B80) A partition stream holds headers that look like data objects: a zero word, then a size whose payload ends in the size again. Each was copied and summed before its Adler-32 rejected it. On Autodesk's 2025 rme_advanced sample 2,554 such headers claim 8.4 GB between them, and rejecting them took 3.75 s of the stream's 3.96 s scan, against 0.10 s for its 214,923 real objects (counter run 37244006521). The checksum is now summed over the class word and the payload where they lie, with simd-adler32, which miniz_oxide already builds; the scalar adler32 is gone.
Owner
Author
|
Timed on one runner against main with #699's timing job (run 37245443309; the same job reads main against itself within ±1% on 45 of 50 files): 2016 to 2023 files 0.96 to 1.00, 2024 to 2027 files 0.27 to 0.84 (2025 rme_advanced 13.1 s to 9.6 s, 2027 rme_advanced 6.6 s to 1.9 s, Core Interior 4.9 s to 3.2 s). IFC byte-identical (run 37244753521). |
DrunkOnJava
added a commit
that referenced
this pull request
Oct 5, 2026
…unners the wall times came from (B81) (#699) Measure's base and head jobs run on different runners. In today's B80 runs, runner speed alone moved an export's time by up to about 1.7x: run 37244582476 read a change that adds no work in the default export as 1.6x slower on every file, the architecture samples included. So the wall-time table #687 added compares machines as much as code. - **The cross-runner table** now names each side's CPU (`runner.txt` in each artifact, left out of the scorer diff) and says what the numbers are. - **A new `timing` input** adds a job, `Timing (one runner)`. It builds `rvt-ifc` at both refs on one runner, exports every model (and every sample, with `samples`) with each build in turn, and reports the medians and their ratio in the run summary and the `measure-timing` artifact (`tools/ci/measure-timing.sh`). That is three rounds per file, the order alternating each round so a drift in the runner's speed falls on both alike. A file either build fails to export is reported as failed, not timed. - **CONTRIBUTING** says when to use it. Verified by dispatching this branch's workflow with `timing`: #695 against `main` (run 37245443309), and `main` against itself as a noise check (run 37245395447). The results follow in a comment. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI and contributor docs only; no changes to rvt-ifc or export logic. > > **Overview** > Cross-runner **rvt-ifc** wall times in the Measure compare summary are now labeled as coming from **two different runners**, with each artifact carrying **`runner.txt`** (CPU model from `/proc/cpuinfo`) and copy that warns runner speed alone can skew times by ~**1.7x**; **`runner.txt`** is excluded from the scorer diff. > > A new workflow input **`timing`** (when **`base` ≠ `none`**) adds a **Timing (one runner)** job that checks out head and base, builds **`rvt-ifc`** at both refs, and runs **`tools/ci/measure-timing.sh`**: three alternating export rounds per model (and samples when **`samples=true`**), median ms per ref, **head/base** ratio in the run summary and **`measure-timing`** artifact. > > **CONTRIBUTING** documents using **`-f timing=true`** for defensible performance claims instead of the default cross-runner table. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4f95586. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
A partition stream holds headers that look like data objects (RE-153): a zero word, then a size whose payload ends in the size again.
verified_data_objectcopied each candidate's payload and summed it before the Adler-32 rejected it. Scratch counters (run 37244006521) on Autodesk's 2025rme_advancedsample show where the time went. Of one 229 MB stream's 3.96 s scan, 3.75 s rejected 2,554 such headers claiming 8.4 GB between them, against 0.10 s for its 214,923 real objects.The checksum is now summed over the class word and the payload where they lie, with
simd-adler32. miniz_oxide, under flate2, already builds that crate, so the lockfile gains one edge and no crate. The scalaradler32is gone.In-process timing (run 37244777714, the same counters on both sides; the head runner ran untouched steps at about x1.25):
Both sides find the same 214,923 objects and reject the same 2,554 headers. Measure run 37244753521 against
mainchecks the IFC.Note
Low Risk
Localized checksum implementation swap with identical inputs; correctness depends on matching the prior Adler-32 domain, with benchmarks reporting unchanged accept/reject counts.
Overview
Partition data-object verification no longer allocates a scratch buffer or uses a local scalar Adler-32 when rejecting bogus headers during partition scans (RE-153 / B80).
verified_data_objectnow hashes the class word and payload in place withsimd-adler32, matching the previous checksum domain (class + payload excluding the trailing size word). The hand-rolledadler32helper is removed.simd-adler32is declared inCargo.toml(already present transitively viaflate2/ miniz_oxide).This targets the hot path where many false-positive headers each claim large payloads and must be checksum-rejected before being discarded.
Reviewed by Cursor Bugbot for commit 358aae1. Configure here.