guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idea for safe signal handling by a byte code interpreter


From: John Harper
Subject: Re: Idea for safe signal handling by a byte code interpreter
Date: Thu, 22 Mar 2001 13:37:29 -0800

Hong Zhang writes:
|>  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

One of the problems with switch is that it checks that the switched
value is within the range of the jump table (even if you switch on an
eight bit value, and have exactly 256 cases)

See this paper for more details:

@InProceedings{ertl93,
  author =       "M. Anton Ertl",
  title =        "A Portable {Forth} Engine",
  booktitle =    "EuroFORTH '93 conference proceedings",
  year =         "1993",
  address =      "Mari\'ansk\'e L\'azn\`e (Marienbad)",
  url =          "http://www.complang.tuwien.ac.at/papers/ertl93.ps.Z";,
}

        John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]