Skip to content

perf(tests): Enable optimizations for benchmarks #2327

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

Closed
wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 14, 2020

Closes #2326.
Closes #1798.

@ghost ghost changed the title perf(testing): Enable optimizations for benchmarks perf(tests): Enable optimizations for benchmarks Apr 14, 2020
Signed-off-by: Alexander Rodin <[email protected]>
@LucioFranco
Copy link
Contributor

do you have any bench numbers for this?

@binarylogic
Copy link
Contributor

I've updated the issue to close #1798 as well.

@Hoverbear
Copy link
Contributor

Luke noted in #2326 (comment) debug is on intentionally for profiling reasons.

@Hoverbear Hoverbear requested a review from lukesteensen April 16, 2020 16:34
Copy link
Member

@lukesteensen lukesteensen left a comment

Choose a reason for hiding this comment

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

The defaults are here:

[profile.bench]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
lto = false
panic = 'unwind'    # This setting is always ignored.
incremental = false
codegen-units = 16
rpath = false

So the diff here is really lto and codegen-units (I'd like to keep debug = true so we can still profile benchmarks by default). I imagine the biggest difference here is in build times. I worry that significantly increasing those will slow down our iteration time on benches, but it would be nice to have those numbers be better representative of production builds.

Do you have any numbers on the difference in build time for benchmarks with the above changes?

@ghost ghost marked this pull request as draft April 17, 2020 14:00
@Hoverbear Hoverbear assigned ghost Apr 20, 2020
@binarylogic
Copy link
Contributor

@a-rodin is this still relevant given the comments?

@binarylogic
Copy link
Contributor

@a-rodin mind chiming in here?

@binarylogic
Copy link
Contributor

binarylogic commented Jun 13, 2020

@Hoverbear should we close this? If so, can we address the linked issues as well?

@binarylogic binarylogic assigned Hoverbear and unassigned ghost Jun 13, 2020
@Hoverbear
Copy link
Contributor

CLosing...

@Hoverbear Hoverbear closed this Jun 15, 2020
@binarylogic binarylogic deleted the cargo-bench-optimized branch July 23, 2020 17:30
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.

Enable optimizations for benchmarks Set Rust flag codegen-units to 1 for release Vector builds
5 participants