Christian Bau said:
He used a unix tool to measure the total execution time of the program,
which was 0.041 seconds. The function in question was called once. I
would guess that the execution time of that function is less than a
microsecond, so the ratio overhead / execution time is about 41,000 to
1. If he replaced his function with yours which as a rough guess would
be ten times faster, then his measurement will still be 0.041 seconds.
Yes, I noticed that part of the thread. However, the fact that he
made an error if understanding order of magnitude of various things
going on in program execution, it doesn't preclude the possibility
that he correctly profiled at the beginning, but just followed it up
by doing a detailed analysis of a small section of code but measured
it wrong.
But this is comp.lang.c, not comp.programming.realworld so discussions
of what really matters to programmers is probably OT around here.