On Fri, 2016-02-26 at 08:31 -0600, Ranjan Maitra wrote:
Hi,
Disclaimer: This is clearly marked OT, with the only connection to
this group being the fact that I am running F23 on a 20-core Dell
T5810 @3.1 GHz each and 64 GiB memory. My OT queries over the past 13
years (almost) here have elicited great wealth of information so I am
posing here.
So, I am trying to compare two kinds of methods in a C program. Both
are written as efficiently as possible (assumed because no point
otherwise). I would like to know which of these is more efficient. I
have been using get_rusage but I was wondering whether there is a
better way?
I don't claim to be an expert but at first glance I wonder if you've
defined what you mean by efficiency. Execution time? Program size?
Memory locality (affects virtual memory performance) etc.
You might want to read some of the extensive literature on
benchmarking.
Separately, is there a way to get the number of floating point
instructions in C? Both FLOPS and MIPS?
Instructions executed on every code path? On the most likely code path?
Remember: MIPS = Meaningless Indicator of the Performance of Systems.
poc