continue and break frustration

Paul Rubin http
Sun Dec 14 01:12:51 EST 2003


Glen Wheeler <adsl5lcq at tpg.com.au> writes:
>   I've been using the psyco compiler, and it does help (by about 60%).
>   I'm trying to leave writing the function as a C extension as a last
> resort.

Pyrex looks really nice for this situation, though I haven't tried it
myself.

>   I will try with exceptions (get it? :).  To the people in the know,
> does adding this kind of construct detract from the speed of the code
> much?  I do know that try+except can be slower than if+else if
> exceptions are generated more often than not, but how much slower?

If the exception is usually taken, maybe you can reorganize the code
some way so that it's not.




More information about the Python-list mailing list