This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] speedup timevar pushing/poping
Andrew Pinski <pinskia@physics.uc.edu> writes:
>> This is probably OK, but could you post a compiler speed and binary
>> size comparison?
>
> Okay I did some speed and size comparison on i686 (because my PPC
> laptop's battery ran out and I had forgot to take my power supply
> to school today).
>
> Here is the results.
> test before after percent
> Speed, PR8361 -O3 57.27s 57.19 .10%
> cc1 size 11278673 11287701 .09%
> cc1plus 14245041 14258105 .08%
I'm not surprised it's more of a win on PPC, which has a much more
expensive calling convention. However, .1% performance improvements
are tiny enough that I worry about the noise floor. How did you
arrive at that number?
Could you repeat the test with the timevar_push/pop macros modified
thus:
#define timevar_pop(TV) do { if (__builtin_expect (timevar_enable, 0)) timevar_pop_1 (TV); }while(0)
#define timevar_push(TV) do { if (__builtin_expect (timevar_enable, 0)) timevar_push_1 (TV); }while(0)
as I suspect GCC is not clever enough to predict the conditional.
(This will probably be both more of a speed improvement and more of a
size increase.)
zw