Skip to content

perf: ETC2 kernel ~1.7× faster - #11

Merged
verekia merged 1 commit into
mainfrom
perf/etc2-speed
Sep 23, 2026
Merged

verekia merged 1 commit into
mainfrom
perf/etc2-speed

Conversation

@verekia

@verekia verekia commented Sep 23, 2026

Copy link
Copy Markdown
Owner
  • textureGather loads, lumas as column vectors with constant indexing
  • drop the flip/planar-invariant Σ||p||² and Σℓ² terms, float-domain base quantisation, min-form table scores, binary-search table cover
  • both flips scored only for exactly-gray blocks, via a one-channel fit and two straight-line calls instead of a loop
  • flip preselect keeps a tenth of the luma variance (+0.07-0.10 dB on photo colour)
  • CPU 'fast' reference mirrors the new flip rules; docs, test pins updated

GPU pass on Apple M3: ×0.597 geomean over 40 textures (f16), ×0.619 (f32); quality mean +0.008 dB, worst −0.004 dB.

- textureGather loads, lumas as column vectors with constant indexing
- drop the flip/planar-invariant Σ||p||² and Σℓ² terms, float-domain
  base quantisation, min-form table scores, binary-search table cover
- both flips scored only for exactly-gray blocks, via a one-channel fit
  and two straight-line calls instead of a loop
- flip preselect keeps a tenth of the luma variance (+0.07-0.10 dB on
  photo colour)
- CPU 'fast' reference mirrors the new flip rules; docs, test pins updated

GPU pass on Apple M3: ×0.597 geomean over 40 textures (f16), ×0.619 (f32);
quality mean +0.008 dB, worst −0.004 dB.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@verekia
verekia merged commit 0cffbdf into main Sep 23, 2026
1 check passed
@verekia
verekia deleted the perf/etc2-speed branch September 23, 2026 22:23
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.

1 participant