Skip to content

Add helloworld-tiny benchmark #1413

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

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions collector/benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ compiler in interesting ways.
the past.
- **derive**: A large number of simple structs with a `#[derive]` attribute for common built-in traits such as Copy and Debug.
- **externs**: A large number of extern functions has caused [slowdowns in the past](https://github.com/rust-lang/rust/pull/78448).
- **helloworld-tiny**: A trivial program optimized with flags that should reduce binary size.
Gives a lower bound on compiled binary size.
- **issue-46449**: A small program that caused [poor
performance](https://github.com/rust-lang/rust/issues/46449) in the past.
- **issue-58319**: A small program that caused [poor
Expand Down
7 changes: 7 additions & 0 deletions collector/benchmarks/helloworld-tiny/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions collector/benchmarks/helloworld-tiny/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "helloworld-tiny"
version = "0.1.0"
edition = "2021"

[dependencies]

[workspace]

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true
5 changes: 5 additions & 0 deletions collector/benchmarks/helloworld-tiny/perf-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"category": "secondary",
"excluded_profiles": ["Doc", "Check", "Debug"],
"excluded_scenarios": ["IncrFull", "IncrPatched", "IncrUnchanged"]
}
3 changes: 3 additions & 0 deletions collector/benchmarks/helloworld-tiny/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello world!");
}