How to accuratle mesurament the performance of a function?
Hello! So I'm trying to measurement the execution time of a function but I realized that I'm getting different results every time (for the same function). For example let's consider the following code snipped:
Mesurament time is not accurate. ($2215987) * Snippets * Snippets * GitLab
I have also tried with clock_gettime() and it gives me the same inaccurate results. However, what's weird is that If I try to do this more times, the seem to be close in times so only the first clock() will be inaccurate. Any ideas?