loop in python
fredrik at pythonware.com
Tue Aug 23 12:31:03 CEST 2005
Steve Holden wrote:
> If you want a fast language, try Holden. I've just invented it.
> Unfortunately it gets the answer to every problem wrong unless the
> answer is 42, but boy it runs quickly. The code for the whole
> interpreter (it's written in Python) follows:
> print 42
> Why are you looking for a "fast language" without any regard for the
> kind of problems you actually want (or need) to solve?
isn't measuring speed by timing for-loops a 70's thing? I remember doing that
back when I used Z80 BASIC machines (on a 3.58 MHz machine using floating
point variables, each iteration took almost exactly 1 millisecond).
I also remember that the compiler for my first custom language for that machine
contained exactly one optimization: empty loops were replaced with plain assign-
ments. everyone was mightly impressed.
(for another view of Python's performance, see John Walker's floating point
from what I can tell, Python's the fastest interpreter in that test...)
More information about the Python-list