Ints and performance (was Re: PEP0238 lament)

Guido van Rossum guido at python.org
Fri Jul 27 13:56:28 EDT 2001


"Terry Reedy" <tjreedy at home.com> writes:

> We agree that the 10 to 1 gain in programming speed often to usually
> makes up for the 100 to 1 loss in execution speed (or we would not be
> using Python).   But it would not as often make up for a 10000 to 1
> loss (if such resulted from some fancy unification scheme).  Since we
> love Python so much, we would *prefer* not to have to recalculate the
> tradeoff and have to choose between options such as a) convert more
> code to embedded C, which for many would be a first-time experience;
> b) stick with the last 'fast' Python; c) support a parallel 'fast'
> Python version; or d) (gasp!) investigate other languages.

Actually, the numeric unification that *I* have in mind would only
change the rules slightly at the edges where the types touch -- it
would leave the existing implementation and rules largely unchanged.
Therefore the performance would generally be the same, except that it
might be possible for a operation on two longs to return a small int
-- a possible speed *benefit* compared to the current situation.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list