Bytecode optimisation
Christian Tismer
tismer at appliedbiometrics.com
Fri May 21 05:24:47 EDT 1999
Michael Vanier wrote:
...
> There *is* a flexibility-versus-speed tradeoff, of course, but that doesn't
> mean you can't have both in one language. I suspect most hardcore python
> programmers would rather change:
>
> def munge(a, b):
> return 2 * a + 3 * (a - b)
>
> to (pseudo-python)
>
> def munge(a, b):
> declare a, b, return: int # a, b, and return value are ints
> return 2 * a + 3 * (a - b)
>
> than recode in C all the time. This is the kind of direction I'd like to
> see python 2.x take.
Absolutely.
The same declarations would also be added for
the builtins, and we would not only get speed,
but a lot of errors are compile-time detectable.
ciao - chris
--
Christian Tismer :^) <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net
10553 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
we're tired of banana software - shipped green, ripens at home
More information about the Python-list
mailing list