Skip to content

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

@albheim

Description

@albheim

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions