-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Labels
Description
Sometimes users want to copy the result for comparison where @btime
gives too little information but the current @benchmark
is unfriendly for that.
One proposal is to change now:
julia> @benchmark sin(3)
BechmarkTools.Trial: 10000 samples with 1000 evaluations.
Range (min … max): 1.301 ns … 15.216 ns ┊ GC (min … max): 0.00% … 0.00%
Time (median): 1.384 ns ┊ GC (median): 0.00%
Time (mean ± σ): 1.456 ns ± 0.294 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
█ ▅ ▂
▅▃▂▁▁▃█▆▃▂▂▄█▄▃▂▁▂▄▃▂▂▁▁▃▆▃▂▁▂▁▂▅▃▂▁▁▁▂▄▄▂▂▂▁▁▂▄▃▃▂▁▁▁▁▅█▄ ▃
1.3 ns Histogram: frequency by time 1.65 ns <
Memory estimate: 0 bytes, allocs estimate: 0.
to
julia> @benchmark sin(3)
BechmarkTools.Trial: 10000 samples with 1000 evaluations.
Range (min … max): 1.301 ns … 15.216 ns
Time (median): 1.384 ns
Time (mean ± σ): 1.456 ns ± 0.294 ns
-----------------------------------------
GC (min … max): 0.00% … 0.00%
GC (median): 0.00%
GC (mean ± σ): 0.00% ± 0.00%
█ ▅ ▂
▅▃▂▁▁▃█▆▃▂▂▄█▄▃▂▁▂▄▃▂▂▁▁▃▆▃▂▁▂▁▂▅▃▂▁▁▁▂▄▄▂▂▂▁▁▂▄▃▃▂▁▁▁▁▅█▄ ▃
1.3 ns Histogram: frequency by time 1.65 ns <
Memory estimate: 0 bytes, allocs estimate: 0.
so that people can copy the first 3-4 lines without sending really long, wrapped lines.
Besides I think it's much easier to navigate vertically anyway