From 1acdbf764f003649492d016e03808c63e1cbb1c0 Mon Sep 17 00:00:00 2001 From: Henrique Ferrolho Date: Sun, 7 May 2023 17:11:59 +0100 Subject: [PATCH] Update benchmarks.md --- docs/src/benchmarks.md | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/docs/src/benchmarks.md b/docs/src/benchmarks.md index fb5b6a86..6fb50175 100644 --- a/docs/src/benchmarks.md +++ b/docs/src/benchmarks.md @@ -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()`: ``` @@ -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. ```