[英]Benchmarking C++ on Microcontroller more efficiently
I'm interested in benchmarking the execution speed of various ETL and STL library functions on the NXP LPC 804 microcontroller.我有兴趣在 NXP LPC 804 微控制器上对各种 ETL 和 STL 库函数的执行速度进行基准测试。 Currently, I'm doing so by creating a C++ program for each and every function, and then measuring the results with an oscilloscope, which on another note tends to yield quite variable results.目前,我正在为每个 function 创建一个 C++ 程序,然后用示波器测量结果,另一方面,这往往会产生相当多变的结果。
I've looked into various benchmarking suites such as Nanobench and Google Benchmark, however none have worked.我研究了各种基准测试套件,例如 Nanobench 和 Google Benchmark,但都没有奏效。 Does anyone know of a more efficient solution?有谁知道更有效的解决方案? As this is moreso a methodological inquiry than a programming question per se, I don't have any code to attach.由于这更像是一个方法学探究,而不是编程问题本身,所以我没有任何代码可以附加。
If there is a more suitable Stack Exchange channel for this then I will happily delete this post and repost it there.如果有更合适的 Stack Exchange 频道,那么我会很乐意删除这篇文章并将其重新发布到那里。 Thanks!谢谢!
Edit : To add a bit more detail:编辑:添加更多细节:
int main() {
while (true) {
// set GPIO pin
// execute some function
// clear GPIO pin
}
return 0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.