Skip to content

perf: optimize weighted predictor core and row updates#715

Open
hjanuschka wants to merge 1 commit intolibjxl:mainfrom
hjanuschka:perf/pr09-weighted-predictor-core
Open

perf: optimize weighted predictor core and row updates#715
hjanuschka wants to merge 1 commit intolibjxl:mainfrom
hjanuschka:perf/pr09-weighted-predictor-core

Conversation

@hjanuschka
Copy link
Collaborator

This speeds up weighted prediction by removing derived-enum conversion overhead, unrolling hot error/weight paths, and reusing per-row predictor state. It also updates row initialization call sites so the optimized predictor state layout remains behavior-equivalent. Unsafe is used only for bounds-check elimination on indices that are guarded by row-size invariants and debug assertions.

@github-actions
Copy link

Benchmark @ 1d80d23

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

Comparing: e883140e (Base) vs 3ca46430 (PR)

File Base (MP/s) PR (MP/s) Δ%
bike.jxl 24.125 24.213 +0.37% ±1.9%
green_queen_modular_e3.jxl 7.889 7.263 -7.93% ±0.3%
green_queen_vardct_e3.jxl 23.835 23.684 -0.63% ±0.7%
sunset_logo.jxl 2.791 2.909 +4.25% ±0.9%

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