"Register Variables" in interpreted languages

graham@maths.su.oz.au (Graham Matthews)
Sat, 25 Apr 1992 04:23:49 GMT

          From comp.compilers

Related articles
Re: register variables in C. dave.howell@ColumbiaSC.NCR.COM (Dave Howell) (1992-04-24)
"Register Variables" in interpreted languages graham@maths.su.oz.au (1992-04-25)
Re: "Register Variables" in interpreted languages stephen@estragon.uchicago.edu (1992-05-02)
| List of all articles for this month |

Newsgroups: comp.compilers
From: graham@maths.su.oz.au (Graham Matthews)
Keywords: interpreter, optimize
Organization: Sydney University Computing Service, Sydney, NSW, Australia
References: 92-04-125
Date: Sat, 25 Apr 1992 04:23:49 GMT

Recently there has been a fair bit of discussion in comp.compilers about
compiler register allocation for optimisation. As a developer of an
interpreted language I would like to move the discusion toward similar
optimisation tricks that can be done in interpreted environments. I am
particularly interested in expression analysis as I already have a very
fast statement interpeter. Now I use a fairly standard stack based
expression evaluator. I am interested in optimisation tricks in such an
environment. eg:

a) ways to reduce the number of push's and pops

b) notions of 'registers' to bypass the stack operations

c) methods of reducing the overhead of function calling.

NOTE: I realise there are other ways of evaluating expresions (eg: graph
reduction) that may be faster than the standard technique mentioned above,
but I am more interested in stack based evaluation.

There does not seem to much literature in optimising interpreted

Outside these sorts of small optimisations there is also the possibility
in an interpreted environment for the code to optimise itself as it runs -
for example we employ dynamic typing but remember type bindings in loops
(the code therefore self optimises at run-time). Does anyone have any
experience with optimisation as you run?

Graham Matthews
Pure Math, Uni.Sydney, Oz

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.