Skip to content

Reuse exact retained maximum selection in 3D intensity batches - #635

Merged
trissim merged 4 commits into
mainfrom
perf/intensity-batch-maxima-20261004
Oct 4, 2026
Merged

trissim merged 4 commits into
mainfrom
perf/intensity-batch-maxima-20261004

Conversation

@trissim

@trissim trissim commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

The 3D intensity batch now uses the existing exact maximum-retention algorithm instead of sorting every foreground intensity. It shares the scalar path’s NumPy 1.24 tie ordering and existing foreground/object-domain owner, without a new kernel, cache or wrapper.

On saved original 60×256×256 production inputs, one complete-backend pair improves 0.534→0.340s (−0.194s). All 88 feature arrays and 1,764 accepted CSV values match exactly. Four existing controls pass on current main db5d6fa. Normal registered preparation installs the actual float32/int64 helper signatures before READY.

One first/only 3D job per source on current main db5d6fa versus this branch 408675a, CPU5/1w1t/INLINE, shows the changed intensity step improving 0.655413→0.564878s (−90.534ms). All four strict comparisons against the two retained native executions pass.

Whole-pipeline timing is worse in this observation: execution 4.843450→6.261316s (+1.417866s), total 6.043962→7.441233s (+1.397271s), peak RSS 1650.664→1980.078MiB (+329.414MiB). Compilation is 0.915580→0.927179s. The six largest slower steps occur before the changed intensity computation at step21; pre-step21 span deltas sum to +1.488868s. This is temporal counterevidence against that computation causing those earlier delays, not proof of a host/GC/JIT cause. Preparation and server startup are excluded from pipeline timing. No end-to-end speedup or new native timing claim.

The original qualification kept the PR draft while the whole-pipeline discrepancy was investigated. Original backend replay evidence remains tied to its recorded source and unchanged module bytes; source-only local tests do not establish runtime improvement.

Closes #634

After the recorded comparison, merged current main dc448b0 into PR HEAD 97cbbad. The intensity module bytes remain identical. The comparison above is still tied to db5d6fa/408675a27 and is not fresh qualification of the later combined source.

Merged current main 5c20b3d (including #648) into this existing branch. Three current intensity admission/batch controls pass, and the production intensity patch remains the same ten-line diff. At the user’s explicit request to merge locally qualified work, this is being merged as an exact algorithm improvement; the retained negative whole-pipeline observation above remains valid and is not reinterpreted as an end-to-end gain.

@trissim
trissim force-pushed the perf/intensity-batch-maxima-20261004 branch from 24b68c9 to 408675a Compare October 4, 2026 15:24
@trissim
trissim marked this pull request as ready for review October 4, 2026 18:39
Copilot AI balanced review requested due to automatic review settings October 4, 2026 18:39

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 merged commit 080899f into main Oct 4, 2026
3 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.

Reuse retained maximum selection in 3D intensity batches

2 participants