Forth like interpreter

Darrell darrell at dorb.com
Tue Mar 14 20:01:53 EST 2000


"Fredrik Lundh wrote:
> umm.  do you seriously think that the best way to
> speed things up is to go find something that takes
> less than one percent of the execution time, and
> work very hard on making that little part run a few
> percent faster?
>
Have you profiled this ?
What about a loop like this:
    cnt=0
    for x in range(999999):
        cnt=cnt+1

Here I'd guess memory allocation then back to the switch statement as the
top time consumers.

AFIK optimization in Python means to move as much work as possible into 'C'
extensions like "string.join".
Also avoid memory allocation, which "string.join" helps with.

Would translating byte codes to some other kind of threading model when
loaded, be a form of JIT ?

--Darrell








More information about the Python-list mailing list