Related articles |
---|
[4 earlier articles] |
Re: PCODE Interpereters 101 sda@rt66.com (1999-02-05) |
Re: PCODE Interpereters 101 gneuner@dyn.com (1999-02-05) |
Re: PCODE Interpereters 101 cfc@world.std.com (Chris F Clark) (1999-02-10) |
Re: PCODE Interpereters 101 sam@cogent.ca (Sam Roberts) (1999-02-12) |
Re: PCODE Interpereters 101 kevin.b.smith@intel.com (Kevin B. Smith) (1999-02-15) |
Re: PCODE Interpereters 101 cfc@world.std.com (Chris F Clark) (1999-02-15) |
Re: PCODE Interpereters 101 toring@inet.uni2.dk (Torben Ring) (1999-02-18) |
Re: PCODE Interpereters 101 aduncan@cs.ucsb.edu (aduncan) (1999-02-21) |
Re: PCODE Interpereters 101 albaugh@agames.com (1999-02-24) |
Re: PCODE Interpereters 101 Scott.Daniels@Acm.Org (Scott.David.Daniels) (1999-03-02) |
From: | Torben Ring <toring@inet.uni2.dk> |
Newsgroups: | comp.compilers |
Date: | 18 Feb 1999 10:44:03 -0500 |
Organization: | UNI2 Internet Kunde |
References: | 99-01-079 99-01-117 |
Keywords: | interpreter, , comment |
Scott Amspoker wrote:
> I always felt that P-code's static links weren't a very efficient
> way to handle the problem. The PUSH and POP instructions
> (LOAD/SAVE, whatever) contained the lexical level of the variable as
> well as its offset within its stack frame. For "global" variables
> and variables in the current frame, it was reasonably efficient.
> However, for variables somewhere in between, the engine had to
> follow the static links the necessary number of steps to locate the
> desired frame.
Hi,
You're quite right about this efficiency talk, but if you use a thread
coded intermediate version of the p-code you can gain a lot of speed -
eg. a factor 100 or so. But the overhead is still there... I'm
running a thread coded version of a Pascal compiler and the
performance is pretty good :)
Torben
[Before anyone asks, threaded code is interpreted code where the tokens
are the addresses of the interpretive routines, which makes the interpreter
dispatch about two instructions. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.