I'm interested in benchmarking the execution speed of various ETL and STL library functions on the NXP LPC 804 microcontroller. 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.
I've looked into various benchmarking suites such as Nanobench and Google Benchmark, however none have worked. 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. Thanks!
Edit : To add a bit more detail:
int main() {
while (true) {
// set GPIO pin
// execute some function
// clear GPIO pin
}
return 0;
}
According to the datasheet the LPC804 has a "32-bit general purpose counter/timer", maybe you could configure it to make the measurement. This way you could write timing code once and check the results programmatically.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.