Skip to content

Confusing numbers in histogram #249

@giordano

Description

@giordano

Trying to reproduce the benchmarks in this discourse post, I've got

ulia> @benchmark $a[$w] .= $b[$w]
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  10.176 μs …  1.150 ms  ┊ GC (min … max): 0.00% … 98.96%
 Time  (median):     10.987 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   13.660 μs ± 17.326 μs  ┊ GC (mean ± σ):  3.08% ±  2.71%

  █                                                            
  █▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁
  53.4 μs         Histogram: frequency by time        11.1 μs <

 Memory estimate: 39.33 KiB, allocs estimate: 2.

The mean time is 13.660 μs ± 17.326 μs, I haven't looked at the code but the standard deviation larger than the average time itself looks suspiciously wrong (or maybe large one-sided outliers are screwing it up?). 👈 Yes, I believe the problem is that the distribution isn't normal, there are large outliers only on one side, so the standard deviation is messed up. The issue below still stands though 👇

Also, note that the histogram has 53.4 μs on the left and 11.1 μs on the right: I have no idea how to read this histogram, is it reversed?

Metadata

Metadata

Assignees

No one assigned

    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