Skip to content

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Apr 17, 2025

This PR adds a replacement for the clap benchmark. It contains only the clap_derive version from clap, because it is now a workspace. 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
@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
Member 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.

@Kobzol Kobzol changed the title Update clap to 4.5.36 Add clap_derie 4.5.32 benchmark Apr 24, 2025
@Kobzol Kobzol changed the title Add clap_derie 4.5.32 benchmark Add clap_derive 4.5.32 benchmark Apr 24, 2025
@Kobzol Kobzol force-pushed the benchmark-update-2025-clap branch from 95a6fac to 9bb064a Compare April 24, 2025 14:23
@Kobzol
Copy link
Member Author

Kobzol commented Apr 24, 2025

Replaced clap with clap_derive.

@Kobzol Kobzol requested a review from nnethercote April 24, 2025 14:24
@Kobzol Kobzol merged commit d02b205 into rust-lang:master Apr 28, 2025
10 of 11 checks passed
@Kobzol Kobzol deleted the benchmark-update-2025-clap branch April 28, 2025 06:01
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