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

Incorrect(?) bar heights and plot labels from @benchmark #246

Closed
albheim opened this issue Aug 6, 2021 · 3 comments
Closed

Incorrect(?) bar heights and plot labels from @benchmark #246

albheim opened this issue Aug 6, 2021 · 3 comments
Assignees

Comments

@albheim
Copy link

albheim commented Aug 6, 2021

Got some results that did not really seem correct, thought I would just drop them here.

Here the bar colored the same as the median text is the leftmost bar, reasonable since median is 924 and first bar is 923. But looking at the total "mass" of the bars it is clear that the median would not be in the first one. So either the plot seems to have cut off a very large first bar, or the median calculation seems wrong. I sadly could not inspect the data since I ran multiple things from a script and didn't assign the returned value, and when running it a second time it did not produce a similar plot.

julia> @benchmark clear_factors_simd!(x, 202, 500_000)
BenchmarkTools.Trial: 10000 samples with 34 evaluations.
 Range (min  max):  923.294 ns   1.739 μs  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     924.059 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   968.648 ns ± 93.556 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%

  █▂▂▁▃   ▅▁▁▁ ▄    ▂    ▁     ▁     ▁                     ▃   ▁
  ███████▇███████▇▇▇█▇▇▆▆█▆▇▅▃▆█▅▅▄▄▄█▅▆▄▄▁▄█▄▃▄▃▄▃▇▄▄▁▃▃▃▁█▇▆ █
  923 ns        Histogram: log(frequency) by time      1.33 μs <

 Memory estimate: 0 bytes, allocs estimate: 0.

The plot starts at 180 and ends at 1.69 so given the range I assume it is supposed to say 1.080 instead of 180 maybe?

julia> @benchmark clear_factors_turbo!(x, 202, 500_000)
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
 Range (min  max):  1.075 μs    4.692 μs  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     1.135 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   1.187 μs ± 159.399 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%

  █▇  ▁  ▅                                                     
  ██▃▅█▃▃█▄▂▆▆▂▂▃▃▂▂▃▃▂▂▂▃▂▂▂▂▃▂▂▂▃▃▂▂▂▂▃▃▂▂▂▂▄▃▂▂▂▂▂▂▂▂▂▁▂▁▂ ▃
  180 μs          Histogram: frequency by time        1.69 μs <

 Memory estimate: 0 bytes, allocs estimate: 0.

This is BenchmarkTools v1.1.1 with Julia v1.6.2 on Linux.

@tecosaur
Copy link
Collaborator

The 180us is very suspicious, perhaps ce89e45 or #245 relates to that.
Regarding the bar height, they key thing is the log at the bottom. Clearly it can be confusing (see #237), but I haven't had a good idea yet on how to deal with it.

@albheim
Copy link
Author

albheim commented Aug 26, 2021

Ahh okay. Once you know about the log thing I guess it can be useful, but without knowing it can make you very confused so I think it has to be very clear that it switches.

@gdalle
Copy link
Collaborator

gdalle commented Jun 13, 2023

Closing this in favor of #237

@gdalle gdalle closed this as completed Jun 13, 2023
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

No branches or pull requests

3 participants