[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Idea for safe signal handling by a byte code interpreter
From: |
Keisuke Nishida |
Subject: |
Re: Idea for safe signal handling by a byte code interpreter |
Date: |
Thu, 22 Mar 2001 18:05:56 -0500 |
User-agent: |
Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.99 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Thu, 22 Mar 2001 13:37:29 -0800,
John Harper wrote:
>
> |> I've looked, a little, (and months ago at that) at the LibREP (ala
> |> "sawfish") virtual machine. It's a pretty good indirect threaded VM
> |> that uses techniques pioneered by Forth engines. It utilizes the GCC
> |> ability to take the address of a label to build a jump table indexed
> |> by opcode. Very efficient.
> |
> |It is not very portable. I don't believe it will be any faster than
> |switch case.
>
> IIRC it was at least 10% faster; portability is maintained by falling
> back to switch on non-gcc systems
In my experiment with Guile VM (which uses the same technique as rep's),
it is 50% faster:
[ labels as values ]
address@hidden> ,time (fib 30)
$1 = 1346269
clock utime stime cutime cstime gctime
3.14 3.02 0.12 0.00 0.00 0.00
[ switch ]
address@hidden> ,time (fib 30)
$1 = 1346269
clock utime stime cutime cstime gctime
4.76 4.70 0.06 0.00 0.00 0.00
This is a result of 30,000,000 VM instruction calls and purely
reflects the difference between the two, I believe.
Kei