Message78730
Antoine Pitrou wrote:
> [...] count the number of indirect jump instructions in ceval.c:
>
> grep -E "jmp[[:space:]]\*%" ceval.s
>
> There should be 85 to 90 of them, roughly. If there are many less, then
> the compiler has tried to optimize them by "sharing" them.
I get 86 with GCC 4.x and SUNCC. However, with GCC 3.4 I only get a
single computed goto. Is there some hidden option to make GCC avoid
sharing jumps?
> Because otherwise the measurements these options are meant to do would
> be meaningless.
Ah, I see now. Maybe you should add a quick comment that mentions this.
> I don't have a Sun machine to test, so I'll leave to someone else to
> check and enable if they want to.
I tested it and it worked, no test failures to report. Just change the
macro test:
#ifdef __GNUC__ && \
...
to
#ifdef (__GNUC__ || __SUNPRO_C) && \
...
I attached some additional benchmarks on SunOS. So far, it seems the
benefits of the proposed optimization are highly compiler-dependent. |
|
Date |
User |
Action |
Args |
2009-01-01 21:58:29 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti, lemburg, skip.montanaro, rhettinger, pitrou, christian.heimes, blaisorblade |
2009-01-01 21:58:28 | alexandre.vassalotti | set | messageid: <1230847108.63.0.351801014097.issue4753@psf.upfronthosting.co.za> |
2009-01-01 21:58:26 | alexandre.vassalotti | link | issue4753 messages |
2009-01-01 21:58:25 | alexandre.vassalotti | create | |
|