En jämförelse av Embedded Template Library prestanda med libstdc++ i ESP-IDF
The ESP32 family of microcontrollers by Espressif Systems is widely used in IoT applications due to its built-in WiFi and Bluetooth. Its official SDK, ESP-IDF, provides a C/C++-based API and uses the Two-Level-Segregated-Fit (TLSF) allocator for dynamic memory management. While C++ is popular in embedded development for its C compatibility,and low runtime overhead, parts of the standard library are often avoided due to their reliance on heap allocation. This paper compares the performance of common C++ standardlibrary containers with their statically allocated counterparts from the Embedded Template Library (ETL) on the ESP32-S3. CPU cycle counts and long-term memory behaviourare evaluated in a small weather-station simulation. ETL containers showed better performance and predictable memory use. However, responsible use of standard containerscaused no severe heap fragmentation, indicating they remain viable under ESP-IDF with care.
Publication Details
- Journal
- KTH Publication Database DiVA (KTH Royal Institute of Technology)
- Published
- 2025-01-01
- Primary Topic
- Arduino and IoT Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00