perf: improved bench settings performance - #535
Conversation
|
Hey, opt-level 3 is default for release, there is no need to explicitly set it. |
|
alright I did not know that, I thought it was 2 but it's really weird, I'm getting this now that I removed it and more I haven't touched anything else |
|
honestly I'm rerunning benchmarks now a bit better at it seems that without modifying any code I get 2-10% magic jumps either for better or worse |
|
yeah it's weird, I'm going to remove the release one |
|
I've been rerunning benchmarks without modifying absolutely anything a few times, and benchmark precision doesn't seem to be great that's after repeated runs of the same code with zero changes nor anything it's wild it looks like it depends on codegen or who knows what not sure I can trust this I've also gotten with no changes. it's totally unreliable or I'm doing something very wrong |
|
Increase benchmark time to 1500-5000ms and retest. .measurement_time(Duration::from_millis(1500));
|
this PR customizes the compile-time profiles in
Cargo.tomlto improve performanceon release
it sets
opt-levelto 3 by defaultthis doesn't increase compile-time noticeably and yields fairly consistent 2-10% performance improvements in benchmarks
on bench
it enables LTO, sets codegen units to one, strips debug info, and sets
opt-levelto threeletting the compiler do actual optimization allows us to judge whether codegen has really improved and smallvec is getting faster rather than performance changes being a byproduct of how the compiler decided to transform the code
closes #515