[M3devel] m3cc static chain stuff

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Sat May 29 00:07:20 CEST 2010


On Wed, May 26, 2010 at 06:04:42PM -0500, Rodney M. Bates wrote:
>
>
> Jay K wrote:
>>> From: hosking at cs.purdue.edu
>>> Date: Wed, 26 May 2010 10:28:51 -0400
>>> To: jay.krell at cornell.edu
>>> CC: m3devel at elegosoft.com
>>> Subject: Re: [M3devel] m3cc static chain stuff
>>>
>>>
>>>
>>> We should endeavour to use the same functionality that the C compiler 
>>> uses for its own nested functions, 
>
> whereever possible. The only thing is that we also build closures, so the trampoline mechanisms should be avoided.
>>
>>
>> Right..for those that don't know..
>>
>>
>> There's no "good" efficient way to implement nested functions.
>> Our implementation is pretty "bad".
>> gcc's implementation is pretty "bad".
>
> I think this is far too critical.  The inefficiencies you see are
> minor.  Certainly no worse than the implementation of dispatching
> methods of objects, something the world is gaga about.

Sufficiently gaga that hardware manufacturers are trying to make it 
really fast.  Things like fetch- and branch- prediction.

We may as well use them if there isn't something better around.

-- hendrik



More information about the M3devel mailing list