Skip to content

Commit 537cbb4

Browse files
fixup! fixup! Attempt at pretty example
1 parent 5cd0c0f commit 537cbb4

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,28 +77,30 @@ However, due to the current implementation details of Base `any`/`all`, early br
7777
<details>
7878
<summaryClick me! ></summary>
7979
<p>
80+
81+
A very simple comparison.
8082
```julia
81-
julia> @btime mapreduce(abs2, +, A1, dims=(1,2,4))
82-
BenchmarkTools.Trial: 10000 samples with 159 evaluations.
83-
Range (min max): 663.723 ns 115.200 μs ┊ GC (min max): 0.00% 99.07%
84-
Time (median): 823.692 ns ┊ GC (median): 0.00%
85-
Time (mean ± σ): 833.701 ns ± 1.614 μs ┊ GC (mean ± σ): 2.73% ± 1.40%
83+
julia> @benchmark mapreduce($abs2, $+, $A1, dims=$(1,2,4))
84+
BenchmarkTools.Trial: 10000 samples with 133 evaluations.
85+
Range (min max): 661.038 ns 139.234 μs ┊ GC (min max): 0.00% 99.24%
86+
Time (median): 746.880 ns ┊ GC (median): 0.00%
87+
Time (mean ± σ): 798.069 ns ± 1.957 μs ┊ GC (mean ± σ): 3.46% ± 1.40%
8688

87-
▇█▁
88-
▂▂▃▂▂▂▂▁▁▁▁▁▁▁▂▂▂▂▃▄▄▇███▄▃▃▃▂▂▂▂▃▃▃▄▄▅▇▇██▇▆▆▆▆▇▆▅▅▄▄▃▃▃▃▃▃ ▃
89-
664 ns Histogram: frequency by time 908 ns <
89+
█▄
90+
▃█▇▃▂▁▁▁▁▁▁▁▁▁▂▂▅██▅▄▄▃▂▂▁▁▁▁▁▁▁▁▂▂▃▄▄▄▄▄▅▅▅▄▄▃▃▃▃▃▂▂▂▂▂▂▂▂▁▁ ▂
91+
661 ns Histogram: frequency by time 906 ns <
9092

9193
Memory estimate: 368 bytes, allocs estimate: 8.
9294

93-
julia> @btime vvmapreduce(abs2, +, A1, dims=(1,2,4))
94-
BenchmarkTools.Trial: 10000 samples with 792 evaluations.
95-
Range (min max): 158.871 ns 24.821 μs ┊ GC (min max): 0.00% 98.82%
96-
Time (median): 203.812 ns ┊ GC (median): 0.00%
97-
Time (mean ± σ): 210.932 ns ± 733.001 ns ┊ GC (mean ± σ): 10.39% ± 2.97%
95+
julia> @benchmark vvmapreduce($abs2, $+, $A1, dims=$(1,2,4))
96+
BenchmarkTools.Trial: 10000 samples with 788 evaluations.
97+
Range (min max): 160.538 ns 29.430 μs ┊ GC (min max): 0.00% 99.11%
98+
Time (median): 203.479 ns ┊ GC (median): 0.00%
99+
Time (mean ± σ): 212.916 ns ± 761.848 ns ┊ GC (mean ± σ): 10.68% ± 2.97%
98100

99-
█▇
100-
▂██▅▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▃▅▆▅▄▂▂▃▅▆▅▄▃▂▂▁▁▁▁▁▁▁▁▁▁ ▂
101-
159 ns Histogram: frequency by time 234 ns <
101+
▄██▄▃▃▁▂▁ ▁▁ ▁▄▅▆▆▄▃▂▄▅▆▅▄▃▂▁▁▁▁
102+
███████████▇█▇▇▇▇▆▆▆▆▅▆████▇▅▆▅▆▇████████████████████▇▇▆▆▆▇██ █
103+
161 ns Histogram: log(frequency) by time 235 ns <
102104

103105
Memory estimate: 240 bytes, allocs estimate: 6.
104106

0 commit comments

Comments
 (0)