c1234...@gmail.com writes:
>On Monday, October 24, 2016 at 2:01:05 PM UTC-4, Scott Lurndal wrote:
>But what does CPU time have to do with my code, instructions per second that is. Sure, my CPU can read and process a certain number of instructions, but I think the various HERTZ constants in my code means something else. What's the truth?
You've neither described the hardware platform or the application,
so we'd simply be guessing.
Ask whomever wrote the code what their intent was.
In Unixland, HERTZ is the frequency of the system clock, as visible
to applications - traditionally, it has been set to 100, which
implies a resolution of 10 milliseconds.
With linux, the value of HERTZ (or HZ) is a kernel configuration parameter
(unless you're using a tickless kernel).
When looking at CPU performance, IPC (instructions per cycle) is the
interesting metric. Given that and the cycle time, one can derive
the mean instructions-per-second count. Note that IPC is workload
dependent (e.g. most modern microprocessors can execute two 64-bit
additions per cycle, but it may take 6+ cycles to execute an integer
divide instruction).