This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexandre.vassalotti
Recipients alexandre.vassalotti, blaisorblade, christian.heimes, lemburg, pitrou, rhettinger, skip.montanaro
Date 2009-01-01.21:58:22
SpamBayes Score 9.04214e-09
Marked as misclassified No
Message-id <>
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__ && \


#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:29alexandre.vassalottisetrecipients: + alexandre.vassalotti, lemburg, skip.montanaro, rhettinger, pitrou, christian.heimes, blaisorblade
2009-01-01 21:58:28alexandre.vassalottisetmessageid: <>
2009-01-01 21:58:26alexandre.vassalottilinkissue4753 messages
2009-01-01 21:58:25alexandre.vassalotticreate