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
Hugues Larrive 3c465836f2 examples and tests: add atmega8 to relevent Makefile.ci
using dist/tools/insufficient_memory/add_insufficient_memory_board.sh
2023-07-11 21:22:02 +02:00
..
app.config.test tests: move bench_ applications to bench/ subdirectory 2023-05-10 09:49:56 +02:00
main.c tests: move bench_ applications to bench/ subdirectory 2023-05-10 09:49:56 +02:00
Makefile tests: move bench_ applications to bench/ subdirectory 2023-05-10 09:49:56 +02:00
Makefile.ci examples and tests: add atmega8 to relevent Makefile.ci 2023-07-11 21:22:02 +02:00
README.md tests: move bench_ applications to bench/ subdirectory 2023-05-10 09:49:56 +02: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.