control structures (was "Re: Sins")
skaller
skaller at maxtal.com.au
Sat Jan 8 09:56:57 EST 2000
Emile van Sebille wrote:
>
> FYI,
>
> I get a significant improvement running Darrell's sample
> with string based exceptions (python -X...):
>
> Time: 7.36000001431
> Time: 0.5
>
> w/-X
> Time: 2.86000001431
> Time: 0.490000009537
>
> but running Skip's there is no difference.
>
> I-don't-know-what-it-means-ly y'rs
Strings are ready to throw. Classes must be instantiated,
which means searching for an __init__ method, etc --
extra overhead. And the 'matching' to find a handler
is more complex with class based exceptions, than a simple
string comparison.
--
John (Max) Skaller, mailto:skaller at maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
voice: 61-2-9660-0850
More information about the Python-list
mailing list