[ann] Minimal Python project

Christian Tismer tismer at tismer.com
Sun Jan 12 17:02:32 EST 2003


Just a partial answer to this one :)

Paul Rubin wrote:
> Christian Tismer <tismer at tismer.com> writes:
> 
>>Opcode dispatch is expensive, so I have to create effective opcodes
>>with direct parameter access.  But maybe you're right and it
>>shouldn't be MMIX.
> 
> 
> I remember seeing a paper once about OpenGenera which was a
> proprietary (not "open" despite its name) program to run Symbolics
> Genera programs on the DEC Alpha by simulating the Lisp machine
> instruction set.  It basically said they found that by making the
> simulation's interpreter loop and register set small enough to fit in
> the Alpha's primary caches it ran as fast as they'd expect microcode
> to run.  

I agree. With a real engine like an Alpha.

My target physical engine is clearly the
whole set of X86's which are dominating
the world (still).
I've written several small intepreters in C,
also tried to make some fast Forth interpreter,
and always found that the X86 doesn't have
enough registers to make a fast, interpreted
stack engine.
Whenever you try to get the C compiler to keep
your vital variables in registers, then you have
nearly nothing left to work with.
Maybe I could have optimized towards the primary
cache, I never did this.
By creating a register machine, I might have the
chance to get the register file into that cache,
and to have the interpreter loop variables in
registers, still.

Of course, programming a stack engine by hand is
much easier. But I'm not going to write assembly
code by hand. That's why I like Python - it will
do all the register spilling stuff for me.
I can access this engine from a very high level
and create efficient code.
(will stop this of course, when Armin is ready to
take over).

(answering the second part later)

ciao - chris
-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/







More information about the Python-list mailing list