Skip to content

perf: avoid zero-initializing modular channel payloads#712

Open
hjanuschka wants to merge 1 commit intolibjxl:mainfrom
hjanuschka:perf/pr06-modular-uninit-allocation
Open

perf: avoid zero-initializing modular channel payloads#712
hjanuschka wants to merge 1 commit intolibjxl:mainfrom
hjanuschka:perf/pr06-modular-uninit-allocation

Conversation

@hjanuschka
Copy link
Collaborator

This adds an uninitialized image constructor that zeros only offset/padding regions, then uses it for modular channel allocation. It removes large buffer zeroing work in hot decode paths while preserving prediction boundary behavior. Unsafe is confined to allocation/row access internals and is safe because modular decode fully writes the data region before any read, and padding is explicitly zeroed.

@github-actions
Copy link

Benchmark @ 2c27f27

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

Comparing: e883140e (Base) vs 5b261fb2 (PR)

File Base (MP/s) PR (MP/s) Δ%
bike.jxl 24.177 24.113 -0.26% ±2.7%
green_queen_modular_e3.jxl 7.864 7.819 -0.57% ±1.6%
green_queen_vardct_e3.jxl 23.819 23.617 -0.85% ±1.4%
sunset_logo.jxl 2.780 2.796 +0.58% ±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