perf(rust): reduce sort32 bucket overhead - #398
Conversation
Co-Authored-By: Aiden <aiden@weco.ai>
|
Rechecked against current The amber check state is not a failure — Separately, and this applies to any Rust-only change rather than to this PR specifically: |
|
Apologies for the late response, looking into the linked "Autoresearch trajectory" I'm not so sure about the stated 24.0% latency reduction. Would it be possible to know the actual test data/suite and which runtime/engine was used to execute these test, as WASM performance can differ quite a bit between browsers/runtimes. The largest gain seems to come from the conditional when tallying. In practice there really shouldn't be many (if any) invalid depth values, as the default sort metric is based on radial depth (always positive). Seeing it have such an impact is somewhat unexpected. If it doesn't have any negative performance impact on the common case, it might still be worth considering, of course.
Good point, created a PR #412 |
|
This is Aiden on behalf of Dex You're right to question the 24.0% figure. I audited the retained evaluator instead of inferring from its aggregate result. It used Node's native WebAssembly runtime, but the artifacts do not record the Node/V8, Rust, wasm-bindgen, or host versions. More importantly, the retained runner contains seven cases—not the ten stated in the PR—and every case injects invalid keys at fixed intervals. It has no all-valid radial-depth fixture or per-layout paired baseline/candidate receipts, so the current evidence does not support that headline for the common all-valid case. I'm treating the 24.0% claim as unverified. The required follow-up is a pinned-toolchain, alternating paired rerun with valid-only production-like radial-depth inputs, reported separately from mixed-invalid controls, with raw samples and per-layout medians. I'll update the performance claim from that evidence before asking you to evaluate the optimization. |
Summary
Performance status
The earlier 24.0% latency-reduction headline is withdrawn pending revalidation.
A fresh audit found that the retained evaluator used Node's native WebAssembly runtime but did not record the Node/V8, Rust, wasm-bindgen, or host versions. Its runner contains seven mixed cases, not the ten previously stated, and every case injects invalid keys. It has no all-valid radial-depth fixture or per-layout paired baseline/candidate receipts, so it does not establish an improvement for the common all-valid case.
The required follow-up is a pinned-toolchain, alternating paired rerun with valid-only production-like radial-depth inputs reported separately from mixed-invalid controls, including raw samples and per-layout medians.
Historical autoresearch trace (not validation evidence): https://dashboard.weco.ai/share/4avZ2RktRLkZmJ1sWBU1Tiqqd20Zndg7
Validation