Skip to content
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

common histogram bounds when displaying multiple benchmarks #256

Open
StefanKarpinski opened this issue Sep 16, 2021 · 2 comments
Open

common histogram bounds when displaying multiple benchmarks #256

StefanKarpinski opened this issue Sep 16, 2021 · 2 comments

Comments

@StefanKarpinski
Copy link

@timholy just implemented manual histogram bounds in #255, but it occurred to me that when you display multiple benchmarks together (in an array, for example), then it would be even nicer to figure out common histogram bounds for all the benchmarks.

@timholy
Copy link
Member

timholy commented Sep 16, 2021

Looks like this currently:

julia> b1 = @benchmark sum(b) setup=(b = rand(Int32, 10^4));

julia> b2 = @benchmark sum(a) setup=(a = reinterpret(reshape, Int32, rand(UInt8, 4, 10^4)));

julia> [b1, b2]
2-element Vector{BenchmarkTools.Trial}:
 913.368 ns
 845.129 ns

This must come from the 2-arg show.

@StefanKarpinski
Copy link
Author

Ah yes, that makes sense—if you have a bunch of benchmarks in an array, you probably want a terse display. There could be a specific function to display a collection of benchmarks as a comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants