Skip to content

perf(colors): vectorize the CMYK characterization and ICC matrix/TRC across pixels #476

Closed

Description

@michaelstonis

Vectorize the CMYK characterization and the ICC matrix/TRC evaluation across pixels. Preserve the floating-point term order so results stay identical; verify over 20 M colors as before.

Blocked by #470 (test and benchmark infrastructure).

Background: docs/research/simd.md (PR #469), section "Proposed follow-up issues".

Rules for every SIMD kernel

  • Internal Vector128<T> only, with the scalar path kept as the fallback. No Vector256/Vector512 or platform intrinsics unless a benchmark shows a need (Mono on the MAUI targets never accelerates Vector256, and AdvSimd needs LLVM, iOS Release only).
  • Bit-exact with the scalar path: an exhaustive (or near-exhaustive) equality test, and the same tests run with DOTNET_EnableHWIntrinsic=0.
  • No allocations; a BenchmarkDotNet case with [MemoryDiagnoser] showing before/after.
  • Measure in both browser builds (the WebAssembly interpreter maps only part of the Vector128 API and can be slower than scalar; the AOT build emits native Wasm SIMD). Do not ship a kernel that regresses the interpreter build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtrack:3C-icc

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions