Open tbarbette opened 1 year ago
You will never get accurate time measurements whatever the setup is, except if your code is the only thing running on the machine with the exact same initial conditions for the whole machine state (hardware state included). That is why measuring code complexity, implementing and counting software traps or using simulators are probably the best solutions.
Trying to shrink the measurement approximation window with such requirements makes implementing the missing instructions in a simulator look like a trivial and inexpensive goal.
I agree there will still be external parameters. But if we can run the code on a dedicated CPU per jobs, on the same machine, the biggest ones are out of the picture already :)
For performance-related course (execution time of sorting algorithms, number of cycles to execute a loop, number of cache misses in a code, ...), we'd like students to get the same "numbers". This also allows a scoreboard, to create a competition between the students.
Potential solutions A few solutions are:
Alternatives