Jason Gloudon wrote:

On Fri, Feb 07, 2003 at 09:49:29AM +0100, Leopold Toetsch wrote:


Yesterday night I hacked together a switched prederefed run loop. It's running ~50% faster then fast_core but a lot slower then the CGoto based loops.

The speedups are great.

I thougt that the switched loop could be faster. One problem could be, that gcc doesn't generate a jump table. It seems to be the binary search strategy for label look up.

... The next question is how do you do use this in a
multi-threaded program without wasting a lot of memory and losing the speedup
becase of the extra memory bloat of having to prederef the same code for every
thread ?

The x86 jit had the same problem (I don't know if anyone has changed that), the
code it generates is only good for a single interpreter.
I don't know yet, how multi threading will be done. But when multiple interpreters share the ->code data member (as newinterp/runinterp) do, then they will use the same JIT/prederef or whatever data.
All code related structures are already in the code segment since my packfile patches.

leo

Reply via email to