This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: switch statement performance


On Wed, 21 Jan 2004, Paul Vixie wrote:

> so if i have to compile stuff like this on non-gcc platforms (like native
> solaris and tru64 which a lot of bind users seem to have) i'll be at the
> mercy of their compilers?

I'm not entirely sure what you're asking, but I think so.

For example, the Renesas H8/300 compiler does not generate btrees for its
switches, and it generates linear compares.

The Javacard has a *huge* switch statement to dispatch to native code for
the Native Method Interface. Guess why the Javacard benchmark results for
native methods looked dismal when compiled with the Renesas compiler...

Toshi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]