Re: Optimizing simple calls in a dynamically typed language?

=?ISO-8859-1?Q?Christoffer_Lern=F6?= <lerno@dragonascendant.com>
Wed, 27 Aug 2008 11:12:12 -0700 (PDT)

          From comp.compilers

Related articles
Optimizing simple calls in a dynamically typed language? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-08-23)
Re: Optimizing simple calls in a dynamically typed language? oliverhunt@gmail.com (oliverhunt@gmail.com) (2008-08-24)
Re: Optimizing simple calls in a dynamically typed language? gene.ressler@gmail.com (Gene) (2008-08-24)
Re: Optimizing simple calls in a dynamically typed language? chris.morley@lineone.net (Chris Morley) (2008-08-25)
Re: Optimizing simple calls in a dynamically typed language? pkhuong@gmail.com (Paul Khuong) (2008-08-25)
Re: Optimizing simple calls in a dynamically typed language? cwarren89@gmail.com (Curtis W) (2008-08-26)
Re: Optimizing simple calls in a dynamically typed language? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-08-27)
Re: Optimizing simple calls in a dynamically typed language? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-08-27)
Re: Optimizing simple calls in a dynamically typed language? cr88192@hotmail.com (cr88192) (2008-09-01)
Re: Optimizing simple calls in a dynamically typed language? vidar.hokstad@gmail.com (Vidar Hokstad) (2008-09-01)
Re: Optimizing simple calls in a dynamically typed language? gene.ressler@gmail.com (Gene) (2008-09-01)
Re: Optimizing simple calls in a dynamically typed language? eliotm@pacbell.net (Eliot Miranda) (2008-09-04)
Re: Optimizing simple calls in a dynamically typed language? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-09-05)
| List of all articles for this month |
From: =?ISO-8859-1?Q?Christoffer_Lern=F6?= <lerno@dragonascendant.com>
Newsgroups: comp.compilers
Date: Wed, 27 Aug 2008 11:12:12 -0700 (PDT)
Organization: Compilers Central
References: 08-08-050 08-08-060 08-08-065
Keywords: optimize, OOP
Posted-Date: 28 Aug 2008 10:09:18 EDT

On 25 Aug, 17:20, Paul Khuong <pkhu...@gmail.com> wrote:
> 1. Unless you have hardware tagged arithmetic support (e.g. SPARC),
> tagging fixnums with 0 saves a couple shifts during arithmetic. The
> downside is that you have to do one more addition for pointer
> operations that don't already add a constant offset. That's not bad at
> all, especially if the architecture you're targeting offers load/store-
> with-(constant-)offset instructions.


Speaking of raw pointers, is that the way to go?


I originally envisioned some sort of (compact) object table where what
I passed around was simply the index into that table rather than the
pointer itself.


Obviously this would mean another point of indirection whenever
accessing data, but I was thinking it would simplify things like
tracking all objects and maybe enable optimizations later on. It's
just an idea and I don't know if it has any real advantages.


I note that most implementations of object systems in C instead rely
on passing a pointer directly to the object struct. What are the
virtues of that approach, except for it being more C-ish?


/Christoffer


Post a followup to this message

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