For a project I am supposed to measure the running time of basic primitive operations in C++ for the machine that I am using. It says this:
Write a program that determines the values of the timing parameters of (
fetch
,store,
+
,-
,*
,/
,<
, function call, function return,new
,delete
, and[]
) for the machine on which it is run.
fetch
and store
is:
a = b + 1
b
and 1
are being "fetched" (and added together with +
), and stored in a
.
I've never done something like this before. Doing I need to use a clock method to calculate the running time? Should the code that I am timing be complex or simple? How many times should it be evaluated?