NitroOS RTOS Performance
Context switch time and interrupt latency are critical metrics for real-time systems. All measurements performed with optimizations enabled (-O2) and verified across multiple runs.
Context Switch Time NitroOS v5.3.0
| Target | Clock | Context Switch | Interrupt Latency |
|---|---|---|---|
| Cortex-M4F @ 168 MHz | STM32F407 | 1.8 µs | 0.9 µs |
| Cortex-M7 @ 480 MHz | STM32H743 | 0.6 µs | 0.3 µs |
| Cortex-M3 @ 72 MHz | STM32F103 | 4.2 µs | 2.1 µs |
| Cortex-M0+ @ 48 MHz | STM32G071 | 8.5 µs | 4.3 µs |
Measurement Methodology
- Context switch measured using DWT cycle counter (CYCCNT)
- Switch between two equal-priority tasks using
NT_TaskYield() - 10,000 iterations, median value reported
- FPU context included for M4F/M7 (lazy stacking enabled)
- Cache enabled for M7 (I-cache + D-cache)
Memory Footprint Minimal Configuration
| Component | Flash (ROM) | RAM (Static) | RAM per Task |
|---|---|---|---|
| NitroOS Kernel | 2.8 KB | 256 B | 64 B + stack |
| + Mutex/Semaphore | +0.8 KB | +32 B/object | - |
| + Message Queue | +1.2 KB | +48 B/queue | - |
| + Software Timers | +0.6 KB | +24 B/timer | - |
NitroSIM Emulator Performance
NitroSIM achieves high-speed ARM Cortex-M emulation through hand-optimized x64 assembly and advanced JIT techniques.
Emulation Speed NitroSIM v6.1.1
| Host CPU | Emulated Core | MIPS | Cycles/Instruction |
|---|---|---|---|
| Intel i7-12700K @ 5.0 GHz | Cortex-M4F | 245 MIPS | ~20 |
| AMD Ryzen 9 5900X @ 4.8 GHz | Cortex-M4F | 228 MIPS | ~21 |
| Intel i5-10400 @ 4.3 GHz | Cortex-M4F | 178 MIPS | ~24 |
| Apple M2 (Rosetta 2) | Cortex-M4F | 165 MIPS | ~26 |
Measurement Methodology
- MIPS calculated as: (instructions executed) / (wall clock time in seconds) / 1,000,000
- Dhrystone compiled with ARM GCC 12.2, -O2, Thumb-2
- Host CPU frequency locked (no turbo variance)
- Background processes minimized, priority elevated
- 10 runs, median value reported
NitroFS File System Performance
Sequential read/write throughput measured on SPI NOR flash and SD card interfaces.
I/O Throughput NitroFS v1.0
| Storage | Interface | Sequential Read | Sequential Write |
|---|---|---|---|
| W25Q128 NOR Flash | SPI @ 50 MHz | 5.2 MB/s | 0.8 MB/s |
| W25Q128 NOR Flash | QSPI @ 100 MHz | 18.5 MB/s | 2.1 MB/s |
| SD Card (Class 10) | SDIO 4-bit @ 25 MHz | 22.0 MB/s | 9.5 MB/s |
| eMMC 5.1 | SDIO 8-bit @ 52 MHz | 85.0 MB/s | 45.0 MB/s |
Test Conditions
- File size: 1 MB, block size: 4 KB
- FAT32 format, cluster size: 4 KB
- DMA transfers enabled where available
- Write-back caching disabled (worst-case)
- Measured on STM32H743 @ 480 MHz
Comparison with Alternatives
Fair comparisons require identical test conditions. These numbers reflect our best-effort recreation of published benchmarks.
RTOS Context Switch Comparison Cortex-M4F @ 168 MHz
| RTOS | Context Switch | Flash | Notes |
|---|---|---|---|
| NitroOS | 1.8 µs | 2.8 KB | 100% assembly kernel |
| FreeRTOS 10.5 | 2.4 µs | 6.5 KB | C implementation |
| Zephyr 3.4 | 3.1 µs | 8.2 KB | C implementation |
| ThreadX 6.2 | 2.0 µs | 4.8 KB | Mixed C/ASM |
Performance varies based on compiler, optimization level, configuration, and use case. Always benchmark with your actual workload. These results are provided for reference only and may not reflect performance in your specific application.
Reproduce Our Results
We believe in reproducible benchmarks. Contact us for access to our benchmark suite and detailed methodology documentation. All measurements can be independently verified.
- Hardware Required: STM32F4-Discovery or NUCLEO-H743ZI
- Toolchain: ARM GCC 12.2 or later
- Measurement: Logic analyzer or DWT cycle counter
Request benchmark access: benchmarks@nitrocortex.com
Related Resources
- Case Studies: See how these benchmarks translate to real-world deployments
- About NitroCortex: Learn about our engineering methodology and quality standards
- Getting Started: Run your own benchmarks with NitroCortex
- Release Notes: Track performance improvements across versions