Skip to content

perf+55.99%: use mimalloc for few individual utils#10954

Draft
oech3 wants to merge 3 commits intouutils:mainfrom
oech3:mimalloc
Draft

perf+55.99%: use mimalloc for few individual utils#10954
oech3 wants to merge 3 commits intouutils:mainfrom
oech3:mimalloc

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Feb 15, 2026

cargo build -p uu_split -p uu_ls still builds split using mimalloc which has very bad performance.
But it does not appear at CodSpeed (clean build). So this should not be merged yet.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 15, 2026

Merging this PR will improve performance by 55.99%

⚡ 50 improved benchmarks
✅ 94 untouched benchmarks
⏩ 182 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation wc_bytes_synthetic[500] 194.8 µs 175.6 µs +10.93%
Simulation b64_decode_synthetic 171.3 µs 152.7 µs +12.17%
Simulation b64_encode_synthetic 167.3 µs 151.6 µs +10.34%
Simulation b64_decode_ignore_garbage_synthetic 168.4 µs 154.1 µs +9.23%
Simulation tsort_tree_dag[(10, 3)] 29.7 ms 27.7 ms +7.09%
Simulation tsort_linear_chain[1000000] 1.4 s 1.2 s +14.8%
Simulation tsort_wide_dag[100000] 117.4 ms 100.5 ms +16.8%
Simulation tsort_complex_dag[50000] 74 ms 65.5 ms +13%
Simulation cp_recursive_deep_tree[(120, 4)] 13.5 ms 12.6 ms +7.41%
Simulation cp_recursive_wide_tree[(6000, 800)] 188.6 ms 174.6 ms +8.01%
Simulation cp_preserve_metadata[(5, 4, 10)] 74.4 ms 67.1 ms +10.81%
Simulation cp_large_file[16] 392.7 µs 332.1 µs +18.27%
Simulation cp_archive_balanced_tree[(5, 4, 10)] 77.3 ms 69.9 ms +10.57%
Simulation cp_recursive_balanced_tree[(5, 4, 10)] 71.8 ms 65.2 ms +10.08%
Simulation ls_recursive_wide_tree[(10000, 1000)] 53.2 ms 41.1 ms +29.46%
Simulation ls_recursive_long_all_deep_tree[(100, 4)] 3.1 ms 2.5 ms +23.68%
Simulation ls_recursive_long_all_wide_tree[(15000, 1500)] 141.2 ms 107.8 ms +31.03%
Simulation ls_recursive_balanced_tree[(6, 4, 15)] 52.7 ms 33.8 ms +55.99%
Simulation ls_recursive_mixed_tree 1.4 ms 1.1 ms +31.36%
Simulation ls_recursive_long_all_mixed_tree 2.7 ms 2.2 ms +26.95%
... ... ... ... ... ...

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


Comparing oech3:mimalloc (3c0465a) with main (5d03f63)

Open in CodSpeed

Footnotes

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

@oech3

This comment was marked as outdated.

@oech3 oech3 force-pushed the mimalloc branch 8 times, most recently from e53a3ec to 2b19a73 Compare February 15, 2026 17:14
@oech3 oech3 closed this Feb 15, 2026
@oech3 oech3 deleted the mimalloc branch February 15, 2026 17:16
@oech3 oech3 restored the mimalloc branch February 15, 2026 17:27
@oech3 oech3 reopened this Feb 15, 2026
@oech3
Copy link
Contributor Author

oech3 commented Feb 15, 2026

Still cargo build -p uu_true -p uu_ls pollutes true binary...

@oech3 oech3 force-pushed the mimalloc branch 2 times, most recently from 272166a to 3c0465a Compare February 15, 2026 19:43
@oech3
Copy link
Contributor Author

oech3 commented Feb 15, 2026

cargo build -p uu_true -p uu_ls pollutes true binary

$ nm target/debug/true |grep mi_malloc
0000000000145440 T _mi_malloc_generic
0000000000138ef0 T mi_malloc
0000000000138ef0 t mi_malloc.localalias
00000000001398b4 T mi_malloc_aligned
0000000000139391 t mi_malloc_is_naturally_aligned

@naoNao89 Any idea to avoid it?

@oech3 oech3 changed the title perf: use mimalloc for few individual utils perf+55.99%: use mimalloc for few individual utils Feb 15, 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.

1 participant