@@ -57,12 +57,11 @@ BenchmarkTools.Trial: 10000 samples with 1000 evaluations.
5757 Memory estimate: 0 bytes, allocs estimate: 0.
5858```
5959
60- Alternatively, you can use the ` @btime ` or ` @belapsed ` macros.
61- These take exactly the same arguments as ` @benchmark ` , but
62- behave like the ` @time ` or ` @elapsed ` macros included with
63- Julia: ` @btime ` prints the minimum time and memory allocation
64- before returning the value of the expression, while ` @belapsed `
65- returns the minimum time in seconds.
60+ Alternatively, you can use the ` @btime ` , ` @btimed ` ,
61+ ` @belapsed ` , ` @ballocated ` , or ` @ballocations ` macros. These
62+ take exactly the same arguments as ` @benchmark ` , but behave
63+ like the ` @time ` , ` @timed ` , ` @elapsed ` , ` @allocated ` , or
64+ ` @allocations ` macros included with Julia.
6665
6766``` julia
6867julia> @btime sin(1 )
@@ -71,6 +70,15 @@ julia> @btime sin(1)
7170
7271julia> @belapsed sin(1 )
73721.3614228456913828e-8
73+
74+ julia> @btimed sin(1 )
75+ (value = 0.8414709848078965 , time = 9.16e-10 , bytes = 0 , alloc = 0 , gctime = 0.0 )
76+
77+ julia> @ballocated rand(4 , 4 )
78+ 208
79+
80+ julia> @ballocations rand(4 , 4 )
81+ 2
7482```
7583
7684### Benchmark ` Parameters `
0 commit comments