1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/bench_sys_atomic_utils
Marian Buschsieweke 58ae12d000
tests/bench_sys_atomic_utils: update Makefile.ci
Sadly GCC currently doesn't optimize as expected and the additional return
value increases the ROM a bit. As a result, the application doesn't fit
into the ROM of four additional boards.
2020-12-16 18:10:53 +01:00
..
main.c tests: Add benchmark for sys/atomic_utils 2020-11-10 10:55:14 +01:00
Makefile tests: Add benchmark for sys/atomic_utils 2020-11-10 10:55:14 +01:00
Makefile.ci tests/bench_sys_atomic_utils: update Makefile.ci 2020-12-16 18:10:53 +01:00
README.md tests: Add benchmark for sys/atomic_utils 2020-11-10 10:55:14 +01:00

Benchmark for sys/atomic_utils

This application will perform 100.000 repetitions (or 1.000.000 on Cortex-M7 and ESP32) for each atomic operation and will print the total time it took in a table. For comparison, the speed of C11 atomics and plain volatile accesses are also printed.

Expectations

Lower is better!

Plain volatile accesses are not atomic, and therefore should perform faster than actual atomic operations. If atomic operations turn out to be faster (by more than rounding errors and noise), something is odd.

The atomic_utils aim to be at least as fast as C11 atomics and often faster. If the atomic_utils implementation performs slower than C11 atomics, you have found potential for further optimization.