-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use jemalloc #481
Use jemalloc #481
Conversation
Benchmark #1: ./fd-sys-alloc '[0-9]\.jpg$' /home/shark Time (mean ± σ): 246.8 ms ± 3.4 ms [User: 960.1 ms, System: 810.0 ms] Range (min … max): 244.1 ms … 257.1 ms 12 runs Benchmark #2: ./fd-jemalloc '[0-9]\.jpg$' /home/shark Time (mean ± σ): 201.0 ms ± 3.0 ms [User: 833.9 ms, System: 666.9 ms] Range (min … max): 196.1 ms … 206.9 ms 14 runs Summary './fd-jemalloc '[0-9]\.jpg$' /home/shark' ran 1.23 ± 0.03 times faster than './fd-sys-alloc '[0-9]\.jpg$' /home/shark'
Released in v7.4.0. |
|
|
Yep. Is there some easy way to do such benchmark? I would try to check the Fedora builds. |
Yes. Build the current master and compare it against a version with these lines removed: Lines 38 to 41 in d48aeda
Benchmark scripts are available at: https://github.com/sharkdp/fd-benchmarks You can use the |
Great. I'll do bench on latest Fedora and come back with results. |
where |
Thank you very much for the feedback! It looks like you can reproduce my results (10%-30% speedup when using jemalloc). |
I keep (compiled) old versions of
fd
around to find performance regressions.I noticed that there was a drop in performance between my
fd-7.0.0
and thefd-7.1.0
binary. However, when re-compiling these old versions with the current version of Rust (1.37), both of them were slow.So this had to do something with the version of Rust I was using at that time. The only thing that came to my mind was the change from jemalloc to the system allocator.
Turns out this makes a pretty big difference (23%):
./fd-sys-alloc '[0-9]\.jpg$'
./fd-jemalloc '[0-9]\.jpg$'
This PR re-enables jemalloc for
fd
.