Nicholas Clark wrote:
On Tue, Feb 11, 2003 at 10:49:14AM +0100, Leopold Toetsch wrote:Leopold Toetsch wrote:
Or go the other way round: Run from JIT. If there is a sequence of non JITable ops, convert these to a CGP section, which returns to JIT when finished. This would save a lot of function calls to jit_normal_op.
The idea actually works at all?
I have it running now.
JIT/i386 uses the stackframe of CGP for its own. When there is a sequence of non-JITed functions, JIT code braanches directly into the CGP core and executes the CGP ops. Going back to JIT is a asm("ret"), which is a new (the 1000th !) opcode.
And it goes faster than the prederef computed goto core?
Yep, though I don't have many test cases:
$ parrot -P life.pbc
5000 generations in 5.629500 seconds. 888.178341 generations/sec
$ parrot -j life.pbc
5000 generations in 5.290360 seconds. 945.115271 generations/sec
$ cd languages/perl6 ; perl6 -C -O3 ../../life.pasm
5000 generations in 5.154097 seconds. 970.102045 generations/sec
parrot/imcc: -O3 compiled on i386/linux, Athlon 800.
Should I commit it or send to the list first?
Nicholas Clark
leo