Skip to content

perf: avoid extra pull_symbol call in unsigned RLE repeat path#736

Closed
hjanuschka wants to merge 1 commit into
libjxl:mainfrom
hjanuschka:perf/pr19-rle-repeat-consume
Closed

perf: avoid extra pull_symbol call in unsigned RLE repeat path#736
hjanuschka wants to merge 1 commit into
libjxl:mainfrom
hjanuschka:perf/pr19-rle-repeat-consume

Conversation

@hjanuschka

@hjanuschka hjanuschka commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

Carved out from the ongoing perf/autoresearch stream after PR #705 split work.

Change:

  • in SymbolReader::read_unsigned_clustered_inline, after push_token consume repeat_count/last_sym directly instead of calling pull_symbol again.

Why:

  • removes one extra call/branch in the hot repeat path
  • behavior is unchanged

@github-actions

github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown

Benchmark @ 7aa67b9

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

Comparing: 462454f5 (Base) vs 4005ee63 (PR)

File Base (MP/s) PR (MP/s) Δ%
bicycles.jxl 7.114 7.074 -0.56% ±3.0%
bike.jxl 25.155 25.265 +0.44% ±1.9%
delta_palette.jxl 6.164 6.133 -0.50% ±0.6%
green_queen_modular_e3.jxl 8.296 8.217 -0.96% ±0.8%
green_queen_vardct_e3.jxl 25.779 25.686 -0.36% ±1.9%
lz77_flower.jxl 3.321 3.325 +0.14% ±0.5%
patches_lossless.jxl 3.203 3.195 -0.25% ±1.5%
sunset_logo.jxl 2.681 2.692 +0.43% ±1.7%

@hjanuschka hjanuschka force-pushed the perf/pr19-rle-repeat-consume branch from 32bf47f to 7aa67b9 Compare March 25, 2026 15:07
@veluca93 veluca93 marked this pull request as draft March 26, 2026 11:36
@veluca93

Copy link
Copy Markdown
Member

A more precise benchmark appears to be inconclusive. Converting this to a draft and leaving it for later evaluation.

@veluca93

Copy link
Copy Markdown
Member

Closing this for now.

@veluca93 veluca93 closed this May 29, 2026
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.

2 participants