-
Notifications
You must be signed in to change notification settings - Fork 150
Move benchmarks to benches module with noinline wrappers #32
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
Conversation
This ensures that the benchmarks are in a separate crate and linked against the smallvec dynamic library rather than being compiled together.
Used a #noinline wrapper from benchmarks to get more consistent results. Looks like the results are a bit worse, but more consistent/realistic since the compiler's inlining during the benchmark itself won't affect the performance.
|
I verified by disassembling the generated executables that beforehand, insert() was being inlined, but after this change it is not. This accounts for the dip in the bench_insert |
Ping on these improvements to the benchmarks. |
@bors-servo: r+ |
📌 Commit 59f5ea6 has been approved by |
⚡ Test exempted - status |
Move benchmarks to benches module with noinline wrappers This ensures that the benchmarks are in a separate crate and linked against the smallvec dynamic library rather than being compiled together. It also nicely removes the need for the "benchmarks" feature. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/32) <!-- Reviewable:end -->
This ensures that the benchmarks are in a separate crate and linked
against the smallvec dynamic library rather than being compiled
together.
It also nicely removes the need for the "benchmarks" feature.
This change is