Skip to content

Prove the shared Li tolerance floor without sorting all pixels - #1086

Merged
trissim merged 1 commit into
mainfrom
perf/li-tolerance-observed-witness-20261006
Oct 6, 2026
Merged

trissim merged 1 commit into
mainfrom
perf/li-tolerance-observed-witness-20261006

Conversation

@trissim

@trissim trissim commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Li thresholding currently sorts all distinct pixel values to calculate its stopping tolerance. An observed positive pixel gap no greater than twice the existing floor proves that the complete-array tolerance equals the floor; this change uses that exact witness and retains the original full calculation when no witness exists. It leaves NumPy float32 reduction order and threshold calculation unchanged.

Closes #1085. This threshold-only change is independent of the pending mixed-device composition changes.

Validation: 17 existing focused threshold hotpath tests passed, including strided/transposed inputs, a close pair missed by the sample, constants, sparse values, and NaN/Inf. A saved genuine Vitra normalized-protein replay matched the original production helper and Li threshold exactly across 19 controls. Seven alternating owner-timing pairs measured old Li 30.37 ms versus new 11.54 ms (18.84 ms median reduction); this is numerical-owner evidence only, not whole-pipeline savings or an additive primary/secondary claim.

Replay input SHA256: a4b6ade8b70376390e578f9938bdb92a44f4b2fa12607922a0566d9ccf91c9cc; original production source: 684f14077476f9b58c1830a5113afe9977b8106e. No pipeline recapture or environment changes.

Ordinary main receiving on 478942fc54a8e3fa6b33539a72dc8f9ba46cde81: one Vitra source well, one worker/thread on CPU5, warmup plus three measured repetitions. All four complete declared image/CSV/database/inventory comparisons passed. Median complete SERVER_PIPELINE_JOB 0.973018 s versus retained guarded stock CP 2.966630 s (3.049×); total 1.228103 versus 2.967356 s (2.416×). Registry/kernel/server startup and scientific comparison excluded. This is an independent whole-pipeline observation on merged main, not isolated per-patch causation or a refreshed whole-cohort minimum. Receipt/report custody remains at /home/ts/.local/state/openhcs-maintenance/20261006/vitra-main-li-witness-ordinary-v1; report SHA256 828a0eb4b2d99c3363b320b8d7233f3b1e1e9bda8072fbd0afcfb2bf6a8668e8.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim force-pushed the perf/li-tolerance-observed-witness-20261006 branch from 05bed1c to 8ffd365 Compare October 6, 2026 22:35
@trissim
trissim changed the base branch from fix/native-payload-domain-composition-20261006 to main October 6, 2026 22:35
@trissim
trissim merged commit 0c8db38 into main Oct 6, 2026
4 of 37 checks passed
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.

Avoid full Li tolerance sorting when an observed gap proves its floor

2 participants