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

Add nalgrebra-0.33.0 benchmark #1977

Merged
merged 2 commits into from
Sep 21, 2024
Merged

Add nalgrebra-0.33.0 benchmark #1977

merged 2 commits into from
Sep 21, 2024

Conversation

lqd
Copy link
Member

@lqd lqd commented Sep 13, 2024

This adds nalgebra as a benchmark, because it exercises the new trait solver differently than the old solver. We saw that with the hang it caused while trying to enable it for coherence.

Tracking its behavior over time will be interesting for enabling the solver for coherence, but also in the future when the trait solver is enabled entirely.

It's not a very costly benchmark to add, here are clean build times (with dependencies)

  • cargo check: 10.2s
  • cargo build: 10.9s
  • cargo build --release: 13.6s

And here are the times for the actual leaf crates benchmarks:

  • check full: 4.9s
  • debug full: 5.4s
  • opt full: 7.6s

I'm opening this as draft for discussion purposes and to see if there are concerns.

@Kobzol
Copy link
Contributor

Kobzol commented Sep 13, 2024

Thank you! I agree that given the recent hang, it seems useful to add this crate to the suite, it is quite popular and does some crazy things with the trait and const system.

Based on local testing, this should make each benchmark run longer by ~3 minutes.

Btw, the collector/compile-benchmarks/REUSE.toml file should be modified with a license for nalgebra (not sure why CI didn't catch this...).

@lqd
Copy link
Member Author

lqd commented Sep 13, 2024

Dang I had done this locally and may have just forgotten to add it before pushing :/ I’ll fix it in a few minutes after rustconf ends

@lqd
Copy link
Member Author

lqd commented Sep 13, 2024

(Done)

Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could delete the tests directory, it has 10k lines, but no problem with leaving it as-is. Otherwise LGTM.

@lqd
Copy link
Member Author

lqd commented Sep 13, 2024

I can do that. Edit: done.

@nnethercote
Copy link
Contributor

The 2022 upgrade docs have the following:

  • bitmaps-3.1.0 [nnethercote, Add bitmaps-3.1.0 #1314]
    • stresses trait stuff, similar to nalgebra-0.30.1
  • nalgebra-0.30.1
    • bitmaps-3.1.0 has similarities, but is smaller and more extreme, and therefore a better choice

But if the difference between nalgebra and bitmaps has increased with the new solver, seems reasonable to add it.

@lqd lqd marked this pull request as ready for review September 14, 2024 03:00
@lqd
Copy link
Member Author

lqd commented Sep 21, 2024

I’m not at a computer where I could open a revert if something goes wrong, but we should merge this soon so that the new PR enabling the new solver can make use of it

clean build times
- cargo check: 10.2s
- cargo build: 10.9s
- cargo build --release: 13.6s

leaf crate build times:
- check full: 4.9s
- debug full: 5.4s
- opt full: 7.6s
@Kobzol
Copy link
Contributor

Kobzol commented Sep 21, 2024

Agree. I just pushed a change that inlined the commit that removed tests, so that we don't have them in git history, hope you don't mind. I'll merge it once CI is green.

@Kobzol Kobzol merged commit bd9cb8e into rust-lang:master Sep 21, 2024
11 checks passed
@lqd lqd deleted the nalgebra branch September 21, 2024 13:33
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