Re: switch statement

Daniele Varrazzo <[email protected]>
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Simon Burton ha scritto:
> Does anyone know if gcc can optimise a switch done with nested if's as well as it optimises a real switch ? (eg. using computed-gotos)

Hi, just my 2 cents: maybe if you need such optimization level it would be 
better to write the core routine(s) in a C module and import it into Pyrex.

If you need all the speed you can, you are going to use C data types in Pyrex 
anyway, and you should be asking to duplicate everything that can be 
implemented in C (probably in the same way it is implemented in C) into Pyrex, 
which is probably not feasible.

-- Daniele
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.