Bytecode optimisation

Markus Kohler markusk at bidra241.bbn.hp.com
Fri May 21 05:48:32 EDT 1999


graham at sloth.math.uga.edu (Graham Matthews) writes:

> Phil Hunt (philh at vision25.demon.co.uk) wrote:
> : Has anyone looked into whether Python could be speeded up by using 
> : similar techniques to those Self uses?
> 
> It's quite a bit of work since Self does dynamic compilation. Some of
> their techniques are surely useable however, for example the way method
> lookups are cached.
> 

method lookups are cached in most Smalltalk implementations since years. 
It's standard technology and not that difficult to implement whereas Self's
dynamic compilation goes far behind this technique and is much more
complicated to implement. 

Just remember Sun's huge delay with HotSpot
which is based on Self's technology, even they had some of the
original team members of the Self project on board.  


Has anyone implemented a method lookup cache for Python ?

Since at least sometimes calling methods in Python is very expensive
this would probably be a good idea. 

In squeak, as far as I remember the lookup cache speeded up method
calls by about 30%. 

Markus
-- 
Markus Kohler  mailto:markus_kohler at hp.com




More information about the Python-list mailing list