Skip to content

perf: speed up distinct index collection in low-memory pipeline#711

Open
hjanuschka wants to merge 1 commit intolibjxl:mainfrom
hjanuschka:perf/pr05-distinct-indices-fastpath
Open

perf: speed up distinct index collection in low-memory pipeline#711
hjanuschka wants to merge 1 commit intolibjxl:mainfrom
hjanuschka:perf/pr05-distinct-indices-fastpath

Conversation

@hjanuschka
Copy link
Collaborator

This removes Option staging in get_distinct_indices and builds the result directly in position order. It reduces overhead in a hot helper used during low-memory pipeline row setup without changing behavior. Unsafe is used only to reborrow previously collected mutable pointers, and is safe because indices are distinct and sorted, so aliasing cannot occur.

@github-actions
Copy link

Benchmark @ e86a453

MULTI-FILE BENCHMARK RESULTS (4 files)
  CPU architecture: x86_64
  WARNING: System appears noisy: high system load (2.13). Results may be unreliable.
Statistics:
  Confidence:               99.0%
  Max relative error:        3.0%

Comparing: e883140e (Base) vs 0915daeb (PR)

File Base (MP/s) PR (MP/s) Δ%
bike.jxl 24.654 24.585 -0.28% ±2.6%
green_queen_modular_e3.jxl 7.923 7.917 -0.07% ±0.6%
green_queen_vardct_e3.jxl 24.099 23.776 -1.34% ±1.4%
sunset_logo.jxl 2.792 2.772 -0.73% ±1.5%

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