Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit 60308b4

Browse files
authored
Gaussian benchmark times (#6)
1 parent e887ddb commit 60308b4

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

README.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -100,28 +100,24 @@ f() = sum((sin(i) for i in 1:round(Int, 1000 + 100*randn())))
100100
```
101101

102102
```
103-
samples: 10000; evals/sample: 3; memory estimate: 0 bytes; allocs estimate: 0
104-
┌ ┐
105-
[ 0.0, 20000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 9978
106-
[ 20000.0, 40000.0) ┤ 16
107-
[ 40000.0, 60000.0) ┤ 3
108-
[ 60000.0, 80000.0) ┤ 0
109-
[ 80000.0, 100000.0) ┤ 1
110-
[100000.0, 120000.0) ┤ 1
111-
[120000.0, 140000.0) ┤ 0
112-
[140000.0, 160000.0) ┤ 0
113-
ns [160000.0, 180000.0) ┤ 0
114-
[180000.0, 200000.0) ┤ 0
115-
[200000.0, 220000.0) ┤ 0
116-
[220000.0, 240000.0) ┤ 0
117-
[240000.0, 260000.0) ┤ 0
118-
[260000.0, 280000.0) ┤ 0
119-
[280000.0, 300000.0) ┤ 0
120-
[300000.0, 320000.0) ┤ 0
121-
[320000.0, 340000.0) ┤ 1
122-
└ ┘
123-
Counts
124-
min: 6.889 μs (0.00% GC); mean: 9.161 μs (0.00% GC); median: 9.014 μs (0.00% GC); max: 327.208 μs (0.00% GC).
103+
samples: 10000; evals/sample: 1; memory estimate: 0 bytes; allocs estimate: 0
104+
┌ ┐
105+
[ 8000.0, 9000.0) ┤ 12
106+
[ 9000.0, 10000.0) ┤▇ 117
107+
[10000.0, 11000.0) ┤▇▇▇▇▇▇▇ 635
108+
[11000.0, 12000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1810
109+
[12000.0, 13000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2959
110+
[13000.0, 14000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2460
111+
ns [14000.0, 15000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1451
112+
[15000.0, 16000.0) ┤▇▇▇▇▇ 456
113+
[16000.0, 17000.0) ┤▇ 89
114+
[17000.0, 18000.0) ┤ 9
115+
[18000.0, 19000.0) ┤ 1
116+
[19000.0, 20000.0) ┤ 0
117+
[20000.0, 21000.0) ┤ 1
118+
└ ┘
119+
Counts
120+
min: 8.109 μs (0.00% GC); mean: 12.865 μs (0.00% GC); median: 12.820 μs (0.00% GC); max: 20.459 μs (0.00% GC).
125121
```
126122

127123
See also <https://tratt.net/laurie/blog/entries/minimum_times_tend_to_mislead_when_benchmarking.html> for another example of where looking at the whole histogram can be useful in benchmarking.

0 commit comments

Comments
 (0)