Event-Driven Performance Evaluation of Statecharts and MicroPython on ESP32-C3 Platforms
摘要
Interpreter-based programming solutions for resource- constrained Internet of Things devices offer an innovative approach to integrating scripting languages into embedded development. While these methods have advantages, they also bring potential performance trade-offs due to the scripting overhead. Performance analysis of interpreter-based solutions is essential to assess their practicality on resource-constrained devices. This study focuses on event-based performance by evaluating the performance of statecharts and MicroPython in handling event-based tasks. The evaluation, grounded in practical application scenarios, assesses event responsiveness and memory efficiency under both single-threaded and multithreaded environments. The results demonstrate the feasibility of both Statecharts and MicroPython for resource-constrained devices. However, statecharts exhibit superior performance, characterized by faster event response, and a smaller memory footprint, making this approach particularly well-suited for more constrained environments.