0

I'm doing some research pertaining to C++ and embedded systems, and I'm currently trying to benchmark and compare the performance and execution speeds of the STL and the Embedded Template Library (ETL). Typically, I use Google's C++ Benchmarking tool to do so, but I can't do so for a variety of reason (lack of CMake since it's an embedded system and lack of available RAM).

So, I'm wondering if there's any alternatives to the Google tool for embedded systems? Particularly, the NXP LPC 804 development board using MCUXpresso IDE and Toolchain for C++17. Thanks!

Richard Robinson
  • 867
  • 1
  • 11
  • 38
  • google benchmark does not require cmake – user7860670 May 23 '20 at 11:38
  • @user7860670 Ah ok, didn't know that. Nonetheless, it's still not possible because of the RAM necessary and the custom toolchain NXP uses. – Richard Robinson May 23 '20 at 11:59
  • 1
    Embedded systems often have much less sophisticated CPU frequency scaling than modern x86 desktops, and if you're running on bare metal there might be no virtual memory / page fault effects, so rolling your own benchmark with a simple repeat loop has fewer pitfalls. You probably still want a warm-up loop, and you do still need to make sure work isn't optimized away across a repeat loop, and that you use the result you compute so it can't optimize away... TL:DR: roll your own. See [Idiomatic way of performance evaluation?](https://stackoverflow.com/q/60291987) for some tips on sanity-checking – Peter Cordes May 23 '20 at 17:38
  • 2
    Also _"lack of CMake since it's an embedded system"_ is a non-sequitur. The build system runs of the development host, and you can use CMake to build embedded systems. – Clifford May 23 '20 at 19:18

0 Answers0