Skip to content

Update clap to 4.5.36 #2073

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Apr 17, 2025

This PR updates the clap benchmark to 4.5.36. Clap is now just a workspace where the root crate only contains documentation, so I benchmark the clap_derive crate, which has no local dependencies, so rustc-perf can deal with it. I added support for selecting a workspace package to rustc-perf to support this, that was easy enough.

clap_derive is a proc-macro, we don't have that many of these in the benchmark suite.

image

time -p CARGO_INCREMENTAL=0 cargo check ; cargo clean
# 1.27
# 1.98

time -p CARGO_INCREMENTAL=0 cargo build ; cargo clean
# 2.07
# 2.85

time -p CARGO_INCREMENTAL=0 cargo build --release ; cargo clean
# 3.29
# 4.22

Related issue: #2024

@Kobzol Kobzol added the benchmark-update PR that updates the benchmark set. label Apr 17, 2025
@Kobzol Kobzol requested a review from nnethercote April 17, 2025 07:21
@Kobzol Kobzol mentioned this pull request Apr 17, 2025
40 tasks
- **clap-3.1.6**: A command line argument parser library. A crate used by many
Rust programs.
- **clap-3.1.6**: A command line argument parser library. A crate used by many Rust programs.
- **clap-4.5.36**: A command line argument parser library. A crate used by many Rust programs.
Copy link
Contributor

Choose a reason for hiding this comment

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

The description should be updated to explain that it's just the proc macro part.

@nnethercote
Copy link
Contributor

nnethercote commented Apr 22, 2025

I think this benchmark should be renamed from clap to clap_derive, and only the clap_derive crate should be included. (The latest version appears to be 4.5.32.) I think that would remove the need for the workspace selection?

@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 23, 2025

That idea also crossed my mind, although the Cargo.toml of clap_derive uses some workspace configuration options, so I would need to modify it slightly. But I suppose that's not really a big issue. So if you're fine with that, I'll do it.

I would still keep the workspace selection logic in rustc-perf, it's quite useful for local benchmarking when you want to benchmark a workspace crate that is not in the main benchmark suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark-update PR that updates the benchmark set.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants