Skip to content

Comments

WIP: sort benchmark for ALLOC_CHUNK_SIZE#11032

Closed
xtqqczze wants to merge 9 commits intouutils:mainfrom
xtqqczze:GH10975
Closed

WIP: sort benchmark for ALLOC_CHUNK_SIZE#11032
xtqqczze wants to merge 9 commits intouutils:mainfrom
xtqqczze:GH10975

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Feb 19, 2026

Follow-up #10975

cc: @oech3

@xtqqczze xtqqczze changed the title GH10975 WIP: GH10975 Feb 19, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 19, 2026

Merging this PR will degrade performance by 8.17%

⚡ 17 improved benchmarks
❌ 5 regressed benchmarks
✅ 266 untouched benchmarks
⏩ 42 skipped benchmarks1

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory sort_mixed_c_locale 2.3 MB 1.9 MB +23.17%
Memory sort_numeric[500000] 43.4 MB 40.1 MB +8.1%
Memory sort_german_c_locale 1.8 MB 2 MB -7.89%
Memory sort_unique_locale[500000] 32 MB 28.7 MB +11.42%
Memory sort_numeric_utf8_locale 4.1 MB 3.8 MB +6.22%
Memory sort_mixed_utf8_locale 2.3 MB 1.9 MB +23.17%
Memory sort_case_insensitive[500000] 16 MB 17.2 MB -7.14%
Memory sort_reverse_locale[500000] 20.5 MB 17.2 MB +19.02%
Memory sort_ascii_only[500000] 20.5 MB 17.2 MB +18.92%
Memory sort_reverse_utf8_locale 2.3 MB 1.9 MB +23.17%
Memory sort_mixed_data[500000] 20.5 MB 17.2 MB +18.97%
Memory sort_dictionary_order[500000] 20.6 MB 17.3 MB +18.9%
Memory sort_case_sensitive[500000] 16 MB 17.2 MB -7.14%
Memory sort_general_numeric[200000] 22.8 MB 21.2 MB +7.71%
Memory sort_key_field[500000] 28.1 MB 30.6 MB -8.17%
Memory sort_ascii_c_locale 4.6 MB 3.7 MB +22.85%
Memory sort_accented_data[500000] 20.5 MB 17.2 MB +19.02%
Memory sort_german_de_locale 1.8 MB 2 MB -7.89%
Memory sort_ascii_utf8_locale 4.6 MB 3.7 MB +22.85%
Memory sort_unique_utf8_locale 3.5 MB 3 MB +14.59%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing xtqqczze:GH10975 (2693d9a) with main (53dfa2e)

Open in CodSpeed

Footnotes

  1. 42 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.

@xtqqczze

This comment was marked as outdated.

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Feb 19, 2026

ALLOC_CHUNK_SIZE = 32 * 1024

  Mode Benchmark BASE HEAD Efficiency
Simulation sort_long_line[10000] 514.9 µs 438.8 µs +17.33%
Memory sort_accented_data[500000] 20.5 MB 21.5 MB -4.51%
Memory sort_mixed_utf8_locale 2.3 MB 1.8 MB +29.62%
Memory sort_ascii_c_locale 4.6 MB 3.6 MB +28.87%
Memory sort_reverse_utf8_locale 2.3 MB 1.8 MB +29.62%
Memory sort_ascii_only[500000] 20.5 MB 21.5 MB -4.66%
Memory sort_ascii_utf8_locale 4.6 MB 3.6 MB +28.87%
Memory sort_dictionary_order[500000] 20.6 MB 21.6 MB -4.64%
Memory sort_long_line[10000] 139 KB 75 KB +85.3%
Memory sort_mixed_c_locale 2.3 MB 1.8 MB +29.62%
Memory sort_case_insensitive[500000] 16 MB 16.5 MB -3.03%
Memory sort_case_sensitive[500000] 16 MB 16.5 MB -3.03%
Memory sort_german_de_locale 1.8 MB 1.9 MB -3.35%
Memory sort_german_c_locale 1.8 MB 1.9 MB -3.35%
Memory sort_key_field[500000] 28.1 MB 29.1 MB -3.44%
Memory sort_unique_utf8_locale 3.5 MB 2.9 MB +18.1%
Memory sort_mixed_data[500000] 20.5 MB 21.5 MB -4.65%
Memory sort_numeric_utf8_locale 4.1 MB 3.8 MB +7.45%
Memory sort_reverse_locale[500000] 20.5 MB 21.5 MB -4.51%

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Feb 19, 2026

ALLOC_CHUNK_SIZE = 16 * 1024

  Mode Benchmark BASE HEAD Efficiency
Memory sort_dictionary_order[500000] 20.6 MB 17.5 MB +17.2%
Memory sort_reverse_locale[500000] 20.5 MB 17.5 MB +17.36%
Memory sort_case_insensitive[500000] 16 MB 14.5 MB +10.47%
Memory sort_key_field[500000] 28.1 MB 25.1 MB +11.95%
Memory sort_ascii_only[500000] 20.5 MB 17.5 MB +17.17%
Memory sort_german_c_locale 1.8 MB 2 MB -9.43%
Memory sort_mixed_c_locale 2.3 MB 1.9 MB +21.16%
Memory sort_german_de_locale 1.8 MB 2 MB -9.43%
Memory sort_numeric_utf8_locale 4.1 MB 3.8 MB +5.7%
Memory sort_ascii_utf8_locale 4.6 MB 3.8 MB +20.83%
Memory sort_general_numeric[200000] 22.8 MB 21.3 MB +7.08%
Memory sort_mixed_utf8_locale 2.3 MB 1.9 MB +21.16%
Memory sort_case_sensitive[500000] 16 MB 14.5 MB +10.47%
Memory sort_unique_locale[500000] 32 MB 28.9 MB +10.48%
Memory sort_mixed_data[500000] 20.5 MB 17.5 MB +17.26%
Memory sort_reverse_utf8_locale 2.3 MB 1.9 MB +21.16%
Memory sort_accented_data[500000] 20.5 MB 17.5 MB +17.36%
Memory sort_unique_utf8_locale 3.5 MB 3.1 MB +13.28%
Memory sort_ascii_c_locale 4.6 MB 3.8 MB +20.83%
Memory sort_long_line[10000] 139 KB 46.8 KB ×3
... ... ... ... ... ...

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Feb 19, 2026

ALLOC_CHUNK_SIZE = 10 * 1024

  Mode Benchmark BASE HEAD Efficiency
Simulation sort_long_line[10000] 514.9 µs 402.7 µs +27.85%
Memory sort_reverse_utf8_locale 2.3 MB 1.7 MB +34.3%
Memory sort_mixed_utf8_locale 2.3 MB 1.7 MB +34.3%
Memory sort_mixed_c_locale 2.3 MB 1.7 MB +34.3%
Memory sort_numeric_utf8_locale 4.1 MB 3.7 MB +8.54%
Memory sort_unique_utf8_locale 3.5 MB 2.9 MB +20.84%
Memory sort_long_line[10000] 139 KB 58.8 KB ×2.4

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Feb 19, 2026

ALLOC_CHUNK_SIZE = 8 * 1024

  Mode Benchmark BASE HEAD Efficiency
Simulation sort_long_line[10000] 514.9 µs 405.4 µs +27.01%
Memory sort_unique_locale[500000] 32 MB 30.9 MB +3.34%
Memory sort_ascii_only[500000] 20.5 MB 19.5 MB +5.18%
Memory sort_reverse_utf8_locale 2.3 MB 2.2 MB +7.17%
Memory sort_key_field[500000] 28.1 MB 27.1 MB +3.69%
Memory sort_dictionary_order[500000] 20.6 MB 19.5 MB +5.22%
Memory sort_ascii_c_locale 4.6 MB 4.3 MB +6.81%
Memory sort_german_de_locale 1.8 MB 1.7 MB +4.04%
Memory sort_reverse_locale[500000] 20.5 MB 19.5 MB +5.3%
Memory sort_case_sensitive[500000] 16 MB 15.5 MB +3.36%
Memory sort_case_insensitive[500000] 16 MB 15.5 MB +3.36%
Memory sort_accented_data[500000] 20.5 MB 19.5 MB +5.3%
Memory sort_long_line[10000] 139 KB 53.9 KB ×2.6
Memory sort_unique_utf8_locale 3.5 MB 3.3 MB +4.72%
Memory sort_mixed_data[500000] 20.5 MB 19.5 MB +5.24%
Memory sort_ascii_utf8_locale 4.6 MB 4.3 MB +6.81%
Memory sort_mixed_c_locale 2.3 MB 2.2 MB +7.17%
Memory sort_mixed_utf8_locale 2.3 MB 2.2 MB +7.17%
Memory sort_german_c_locale 1.8 MB 1.7 MB +4.04%

@xtqqczze

This comment was marked as outdated.

@xtqqczze

This comment was marked as outdated.

@xtqqczze

This comment was marked as outdated.

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Feb 20, 2026

ALLOC_CHUNK_SIZE = 15 * 1024

  Mode Benchmark BASE HEAD Efficiency
Memory sort_mixed_c_locale 2.3 MB 1.9 MB +23.17%
Memory sort_numeric[500000] 43.4 MB 40.1 MB +8.1%
Memory sort_german_c_locale 1.8 MB 2 MB -7.89%
Memory sort_unique_locale[500000] 32 MB 28.7 MB +11.42%
Memory sort_numeric_utf8_locale 4.1 MB 3.8 MB +6.22%
Memory sort_mixed_utf8_locale 2.3 MB 1.9 MB +23.17%
Memory sort_case_insensitive[500000] 16 MB 17.2 MB -7.14%
Memory sort_reverse_locale[500000] 20.5 MB 17.2 MB +19.02%
Memory sort_ascii_only[500000] 20.5 MB 17.2 MB +18.92%
Memory sort_reverse_utf8_locale 2.3 MB 1.9 MB +23.17%
Memory sort_mixed_data[500000] 20.5 MB 17.2 MB +18.97%
Memory sort_dictionary_order[500000] 20.6 MB 17.3 MB +18.9%
Memory sort_case_sensitive[500000] 16 MB 17.2 MB -7.14%
Memory sort_general_numeric[200000] 22.8 MB 21.2 MB +7.71%
Memory sort_key_field[500000] 28.1 MB 30.6 MB -8.17%
Memory sort_ascii_c_locale 4.6 MB 3.7 MB +22.85%
Memory sort_accented_data[500000] 20.5 MB 17.2 MB +19.02%
Memory sort_german_de_locale 1.8 MB 2 MB -7.89%
Memory sort_ascii_utf8_locale 4.6 MB 3.7 MB +22.85%
Memory sort_unique_utf8_locale 3.5 MB 3 MB +14.59%
... ... ... ... ... ...

@oech3
Copy link
Contributor

oech3 commented Feb 20, 2026

I'm not interested in RAM usage if it is bounded, but if I choice one... #11032 (comment) ?

@oech3
Copy link
Contributor

oech3 commented Feb 20, 2026

Can we completely remove useless 0 fill without unsafe block?

@sylvestre
Copy link
Contributor

Please rename this PR for something more useful?
Thanks

@oech3
Copy link
Contributor

oech3 commented Feb 20, 2026

I think it is OK to strip RAM bench from comments.

@xtqqczze

This comment was marked as resolved.

@xtqqczze xtqqczze force-pushed the GH10975 branch 3 times, most recently from ad8e633 to 173d1f7 Compare February 20, 2026 16:20
@xtqqczze
Copy link
Contributor Author

xtqqczze commented Feb 23, 2026

results are invalidated due to:

@xtqqczze xtqqczze force-pushed the GH10975 branch 2 times, most recently from c7955cd to cbe6a05 Compare February 23, 2026 13:36
@xtqqczze xtqqczze changed the title WIP: GH10975 WIP: sort benchmark for ALLOC_CHUNK_SIZE Feb 23, 2026
@xtqqczze
Copy link
Contributor Author

@oech3 We can likely just use 8 KiB.

@oech3
Copy link
Contributor

oech3 commented Feb 23, 2026

@xtqqczze
Copy link
Contributor Author

Superseded by #11078

@xtqqczze xtqqczze closed this Feb 23, 2026
@xtqqczze xtqqczze deleted the GH10975 branch February 23, 2026 14:55
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.

3 participants