Skip to content
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

Optimize compile time #27

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Optimize compile time #27

merged 4 commits into from
Oct 2, 2023

Conversation

Voultapher
Copy link
Owner

The first commit is just cosmetic as discussed, the second one has net positive effect on total compile work, as seen in the User time.

before:

Benchmark 1: cargo build
  Time (mean ± σ):      2.621 s ±  0.026 s    [User: 8.244 s, System: 0.544 s]
  Range (min … max):    2.596 s …  2.647 s    3 runs

after:

Benchmark 1: cargo build
  Time (mean ± σ):      2.610 s ±  0.009 s    [User: 7.986 s, System: 0.550 s]
  Range (min … max):    2.600 s …  2.615 s    3 runs

Doesn't really change compile times, but makes the code a bit more
readable.
This trick is borrowed from ipnsort. The non lto perf doesn't change in
any meaningful amount, as this is not a critical inlining point, but it
allows more parallel work.
@Voultapher Voultapher requested a review from orlp October 2, 2023 05:51
src/pivot.rs Show resolved Hide resolved
@Voultapher Voultapher merged commit 9237364 into main Oct 2, 2023
3 checks passed
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