Bytecode optimisation

Christian Tismer tismer at appliedbiometrics.com
Wed May 19 11:51:35 EDT 1999


Graham Matthews wrote:
> 
> Tim Peters (tim_one at email.msn.com) wrote:
> : No comment intended on the worth of the project or the code (haven't had
> : time to study it) -- just noting that dramatic speedups almost never come
> : from optimizers, but from writing the most appropriate code.
> 
> This depends on what language you are using Tim. For example if you
> are using Self the compiler optimisations on method calls drastically
> speed up code. Likewise if using Sisal the compiler optimisations on
> array allocation drastically speed up code. If using a functional
> language deforestation optimisations speed up code. It very much
> depends on the language you are using.

I agree to both.
My general problem with Python is not only its speed.
The real problem is that I just want to use Python, always.
This is usually ok, and fast enough when dealing with sufficiently
large amounts of data.
There is just a small socket of speed penalty for using Python.

The bad thing is that when your objects become tiny and simple,
the necssary operations become very small, and what remains
is now the small Python socket, which is tuned into a mountain
by that.

Therefore, I see no need to make Python faster in all cases, 
but just in the small simple ones, where my collegues say
"hey, nice done in Python, but why is it 50 times faster in C?"

Then I'm biting my tongue and don't say "since Python is the wrong
language for this problem". I don't want to believe it.
It might be true right now, but it's not proved to stay this way.

Instead, I want Python to become as dumb as C for small
problems, whereby keeping its wonderful flexibility for
the rest. The answer cannot be "write a C extension".

melting-the-socket-of-too-much-freedom-
   -in-a-problem-oriented-way-is-the-problem - ly 'rs - 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