Skip to content

Conversation

@jfinkels
Copy link
Collaborator

@jfinkels jfinkels commented Jan 18, 2026

Simplify the implementation of reading pages by using loops instead of complex iterators. This allows us to scan for both newline and form feed characters in a straightforward way (using memchr).

The current implementation of pr has very different behavior from GNU pr. This pull request is preparation to make some (hopefully many) further improvements.

Simplify the implementation of reading pages by using loops instead of
complex iterators.
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 18, 2026

Merging this PR will degrade performance by 26.25%

❌ 7 regressed benchmarks
✅ 275 untouched benchmarks
⏩ 38 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory sort_key_field[500000] 45.8 MB 51.8 MB -11.46%
Memory sort_ascii_only[500000] 22.2 MB 28.3 MB -21.74%
Memory sort_long_line[160000] 724.4 KB 982.3 KB -26.25%
Memory sort_accented_data[500000] 22.1 MB 28.3 MB -21.78%
Memory sort_mixed_data[500000] 22.5 MB 27.2 MB -17.15%
Memory cp_large_file[16] 107.6 KB 118 KB -8.83%
Simulation cp_large_file[16] 369.8 µs 384.6 µs -3.84%

Comparing jfinkels:pr-simplify (00ce6ba) with main (799de29)

Open in CodSpeed

Footnotes

  1. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

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