Skip to content

nicolov/robotics_benchmarks

Repository files navigation

Robotics benchmarks

CircleCI

This repo contains benchmarks for a few standalone algorithms in Robotics. The code has no system dependencies, and compiles down to a static binary using a cross compiler built using crosstool-ng. This allows us to use a recent gcc version (currently 8.1.0) to get the latest optimizations.

The CircleCI configuration builds (and runs) the benchmark binaries for both Intel x86 and a Raspberry Pi 3, using both gcc and clang.

Included benchmarks

  • Kalman filter: the covariance update step of a fictional Kalman filter. This is a good test of linear algebra performance using Eigen, as it requires matrix multiplication and inversion.

Example output

------------------------------------------------------------------------------------
Benchmark                                          Time             CPU   Iterations
------------------------------------------------------------------------------------
CovarianceUpdateEigen<8>/8                       521 ns          521 ns      1302871
CovarianceUpdateEigen<Eigen::Dynamic>/8         1044 ns         1044 ns       667531
CovarianceUpdateEigen<16>/16                    2730 ns         2730 ns       256067
CovarianceUpdateEigen<Eigen::Dynamic>/16        3290 ns         3290 ns       212534
CovarianceUpdateEigen<32>/32                   14043 ns        14043 ns        49898
CovarianceUpdateEigen<Eigen::Dynamic>/32       14437 ns        14437 ns        47832
CovarianceUpdateEigen<64>/64                   84303 ns        84295 ns         8296
CovarianceUpdateEigen<Eigen::Dynamic>/64       83483 ns        83484 ns         8287
CovarianceUpdateEigen<128>/128                583930 ns       583847 ns         1190
CovarianceUpdateEigen<Eigen::Dynamic>/128     570391 ns       570390 ns         1211

Running

docker-compose build
docker-compose run runner bash

mkdir build
cd build
TRIPLE=x86_64-unknown-linux-gnu cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake ..
make -j$(nproc)
./bm

About

Benchmark setup for some robotics algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published