Skip to content

Commit

Permalink
Update benchmarks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrolho authored May 7, 2023
1 parent 4a50b89 commit 1acdbf7
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions docs/src/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Run `perf/runbenchmarks.jl` to see benchmark results for the Atlas robot (v5). R
> **Note**
> Results on CI builds are **not at all** representative because of code coverage.
Here are the results on an Apple MacBook Air (M1, 2020) (8GB RAM, 512GB SSD) at commit [b9ef1d](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/commit/b9ef1d6974beff4d4fbe7dffc6dbfa65f71e0132):
Below are the results for **RBD.jl 2.3.2** (commit [`b9ef1d`](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/commit/b9ef1d6974beff4d4fbe7dffc6dbfa65f71e0132)) using **Julia 1.8.5** on an **Apple MacBook Air (M1, 2020)** (8GB RAM, 512GB SSD):

Output of `versioninfo()`:
```
Expand All @@ -39,54 +39,34 @@ BenchmarkTools.Trial: 10000 samples with 10 evaluations.
Range (min … max): 3.796 μs … 6.183 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 3.858 μs ┊ GC (median): 0.00%
Time (mean ± σ): 3.879 μs ± 93.310 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
▁▄▄▆▆██▇█▆▇▄▅▄▂▃▁▃▂▃▃▁▃▁▂ ▁ ▂
▅█████████████████████████████▇█▇█▇▆▇▅▆▅▆▅▅▆▅▆▄▇▆█▇▅▆▆▇▅▄▄ █
3.8 μs Histogram: log(frequency) by time 4.18 μs <
Memory estimate: 0 bytes, allocs estimate: 0.
```

Mass matrix ([`mass_matrix!`](@ref)) and Jacobian ([`geometric_jacobian!`](@ref)) from left hand to right foot:
```julia
```
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
Range (min … max): 4.042 μs … 6.763 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 4.167 μs ┊ GC (median): 0.00%
Time (mean ± σ): 4.187 μs ± 115.303 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

▁▁▂▁▁ ▁▃▄▆▇██▇█▇▆▄▃▃▃▃▁▃▃▃▂▂▁▁ ▃
▃▅███████████████████████████████▇██▇██▆▇▆▄▆▅▆▇▇██▆██▆▆▅▁▅▄ █
4.04 μs Histogram: log(frequency) by time 4.5 μs <

Memory estimate: 0 bytes, allocs estimate: 0.
```

Note the low additional cost of computing a Jacobian when the mass matrix is already computed. This is because RigidBodyDynamics.jl caches intermediate computation results.

Inverse dynamics ([`inverse_dynamics!`](@ref)):
```julia
```
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
Range (min … max): 2.700 μs … 5.700 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 2.767 μs ┊ GC (median): 0.00%
Time (mean ± σ): 2.773 μs ± 79.491 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

▁▁█
▂▂▂▂▂▂▃▅▅▆▇█████▇▆▅▄▃▄▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▁▂▂▂▁▂▂▂▂ ▃
2.7 μs Histogram: frequency by time 2.98 μs <

Memory estimate: 0 bytes, allocs estimate: 0.
```

Forward dynamics ([`dynamics!`](@ref)):
```julia
```
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
Range (min … max): 10.554 μs … 23.692 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 10.667 μs ┊ GC (median): 0.00%
Time (mean ± σ): 10.703 μs ± 212.557 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

▃▇█▇▅▂
▁▁▂▂▄███████▇▄▃▂▂▂▁▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
10.6 μs Histogram: frequency by time 11.3 μs <

Memory estimate: 0 bytes, allocs estimate: 0.
```

0 comments on commit 1acdbf7

Please sign in to comment.