You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To attain maximal performance, it is recommended to pass `-O3`, `--check-bounds=no` as command line flags to `julia`. As of Julia 1.1, maximizing performance for the `dynamics!` algorithm requires either setting the number of BLAS threads to 1 (`using LinearAlgebra; BLAS.set_num_threads(1)`) if using OpenBLAS (the default), or compiling Julia with MKL. See [this issue](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/issues/500) for more information.
3
+
To attain maximal performance, it is recommended to pass `-O3` and `--check-bounds=no` as command line flags to `julia`.
4
+
5
+
> **Warning**
6
+
> For Julia versions previous to `v1.8`, maximizing performance for the `dynamics!` algorithm requires either setting the number of BLAS threads to 1 (`using LinearAlgebra; BLAS.set_num_threads(1)`) if using OpenBLAS (the default), or compiling Julia with MKL. See [this issue](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/issues/500) for more information.
4
7
5
8
Run `perf/runbenchmarks.jl` to see benchmark results for the Atlas robot (v5). Results below are for the following scenarios:
6
9
@@ -9,69 +12,81 @@ Run `perf/runbenchmarks.jl` to see benchmark results for the Atlas robot (v5). R
9
12
3. Do inverse dynamics.
10
13
4. Do forward dynamics.
11
14
12
-
Note that results on CI builds are **not at all** representative because of code coverage. Results on a reasonably fast laptop at commit [870bea6](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/commit/870bea668d5b11ce0555fa0552592d2c3cb15c54):
15
+
> **Note**
16
+
> Results on CI builds are **not at all** representative because of code coverage.
13
17
14
-
Output of `versioninfo()`:
18
+
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):
15
19
20
+
Output of `versioninfo()`:
16
21
```
17
-
Julia Version 1.5.3
18
-
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
22
+
Julia Version 1.8.5
23
+
Commit 17cfb8e65e* (2023-01-08 06:45 UTC)
19
24
Platform Info:
20
-
OS: macOS (x86_64-apple-darwin18.7.0)
21
-
CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
25
+
OS: macOS (arm64-apple-darwin22.1.0)
26
+
CPU: 8 × Apple M1
22
27
WORD_SIZE: 64
23
28
LIBM: libopenlibm
24
-
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
29
+
LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
30
+
Threads: 1 on 4 virtual cores
25
31
```
26
32
27
-
Note that this is a different machine than the one that was used for earlier benchmarks.
33
+
> **Note**
34
+
> This is a different machine than the one that was used for earlier benchmarks.
28
35
29
-
Mass matrix:
30
-
31
-
```
32
-
memory estimate: 0 bytes
33
-
allocs estimate: 0
34
-
--------------
35
-
minimum time: 4.415 μs (0.00% GC)
36
-
median time: 4.579 μs (0.00% GC)
37
-
mean time: 4.916 μs (0.00% GC)
38
-
maximum time: 19.794 μs (0.00% GC)
36
+
Mass matrix ([`mass_matrix!`](@ref)):
39
37
```
38
+
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
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.
54
65
55
-
Inverse dynamics:
66
+
Inverse dynamics ([`inverse_dynamics!`](@ref)):
67
+
```julia
68
+
BenchmarkTools.Trial:10000 samples with 10 evaluations.
0 commit comments