Skip to content

Commit d8f0f25

Browse files
committed
update manual
1 parent 1238ee0 commit d8f0f25

File tree

3 files changed

+136
-104
lines changed

3 files changed

+136
-104
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The simplest usage is via the [`@btime` macro](https://github.com/JuliaCI/Benchm
3737
julia> using BenchmarkTools, Compat # you need to use both modules
3838

3939
julia> @btime sin(1)
40-
15.081 ns (0 allocations: 0 bytes)
40+
7.317 ns [100.10% CPU, 0.00% GC] (0 allocations: 0 bytes)
4141
0.8414709848078965
4242
```
4343

@@ -47,13 +47,13 @@ If the expression you want to benchmark depends on external variables, you shoul
4747
julia> A = rand(3,3);
4848

4949
julia> @btime inv($A); # we interpolate the global variable A with $A
50-
1.191 μs (10 allocations: 2.31 KiB)
50+
545.840 ns [100.02% CPU, 0.00% GC] (5 allocations: 1.98 KiB)
5151

5252
julia> @btime inv($(rand(3,3))); # interpolation: the rand(3,3) call occurs before benchmarking
53-
1.192 μs (10 allocations: 2.31 KiB)
53+
547.738 ns [100.03% CPU, 0.00% GC] (5 allocations: 1.98 KiB)
5454

5555
julia> @btime inv(rand(3,3)); # the rand(3,3) call is included in the benchmark time
56-
1.295 μs (11 allocations: 2.47 KiB)
56+
621.614 ns [100.03% CPU, 0.00% GC] (6 allocations: 2.14 KiB)
5757
```
5858

5959
As described the [manual](doc/manual.md), the BenchmarkTools package supports many other features, both for additional output and for more fine-grained control over the benchmarking process.

0 commit comments

Comments
 (0)