Mail Archives: djgpp/2002/06/04/10:47:16
"Alex Vinokur" <alexvn AT bigfoot DOT com> wrote in message
news:3CFCB642 DOT 252CFFF7 AT bigfoot DOT com...
>
> ###############
> Windows98
> gcc/gpp 2.95.3
> ###############
>
>
> A program below measures performance (time) :
> * of operator&& and operator+
> * with automatic and static unsigned int
> * with optimizations : No optimization, O1, O2, O3
>
> We can see that Optimization causes
> an increase in elapsed time for operator&& .
> Any explanation?
...
> automatic, PLUS [1] Total time : 24
> automatic, PLUS [2] Total time : 24
> automatic, PLUS [3] Total time : 17
> automatic, PLUS [4] Total time : 18
> automatic, PLUS [5] Total time : 18
> automatic, PLUS [6] Total time : 17
> automatic, PLUS [7] Total time : 17
> automatic, PLUS [8] Total time : 18
> automatic, PLUS [9] Total time : 17
> automatic, PLUS [10] Total time : 18
...
Your results are useless. They differ by about 25%. Probably the resolution
of your timer is too large (or your processor is too fast). Run your tests
again, but this time measure at least 10,000,000 iterations.
Regards
Heinz
- Raw text -