Related articles |
---|
Dynamic Typing Efficiency clearm@comcast.net (2005-05-08) |
Re: Dynamic Typing Efficiency bobduff@shell01.TheWorld.com (Robert A Duff) (2005-05-08) |
Re: Dynamic Typing Efficiency luke@iogopro.co.uk (Luke McCarthy) (2005-05-08) |
Re: Dynamic Typing Efficiency gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-08) |
Re: Dynamic Typing Efficiency loic@fejoz.net (Yermat) (2005-05-09) |
Re: Dynamic Typing Efficiency mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2005-05-09) |
Re: Dynamic Typing Efficiency eliotm@pacbell.net (Eliot Miranda) (2005-05-09) |
Re: Dynamic Typing Efficiency jeffrey.kenton@comcast.net (Jeff Kenton) (2005-05-09) |
Re: Dynamic Typing Efficiency clearm@comcast.net (2005-05-13) |
Re: Dynamic Typing Efficiency alexc@TheWorld.com (Alex Colvin) (2005-05-13) |
Re: Dynamic Typing Efficiency calumg@onetel.com (Calum Grant) (2005-05-13) |
Re: Dynamic Typing Efficiency angray@beeb.net (Aaron Gray) (2005-05-16) |
Re: Dynamic Typing Efficiency DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-05-18) |
Re: Dynamic Typing Efficiency jeffrey.kenton@comcast.net (Jeff Kenton) (2005-05-22) |
From: | Jeff Kenton <jeffrey.kenton@comcast.net> |
Newsgroups: | comp.compilers |
Date: | 9 May 2005 22:33:01 -0400 |
Organization: | Compilers Central |
References: | 05-05-041 |
Keywords: | types, interpreter |
Posted-Date: | 09 May 2005 22:33:01 EDT |
One other approach not yet mentioned is to do static analysis where
possible, so that you can avoid runtime type checking when it's not
necessary.
clearm@comcast.net wrote:
> Hello,
>
> I am writing a small, python-like scripting language that uses dynamic
> typing. I am also writing a stack-based virtual machine to go with
> it.
>
> I have read many papers and posts about improving the efficiency of
> VMs - for example by using threaded dispatch instead of switch
> statements.
>
> The problem I have is that dynamic typing seems to be extremely
> inefficient when you have a large number of types. For example, if I
> have integers, doubles, strings, booleans, and various compound types,
> then an ADD instruction would have to look like this:
Return to the
comp.compilers page.
Search the
comp.compilers archives again.