[plt-scheme] implementation benefits of immutable pairs

From: Joe Marshall (jmarshall at alum.mit.edu)
Date: Thu Jun 12 15:07:09 EDT 2008

On Thu, Jun 12, 2008 at 11:28 AM, Martin DeMello
<martindemello at gmail.com> wrote:
> On Thu, Jun 12, 2008 at 11:17 AM, Jens Axel Soegaard
> <jensaxel at soegaard.net> wrote:
>>
>> However, making compiler optimizations possible weren't the reason for the
>> shift.
>> The blog post mentions the reasons, improving code correctness is one
>> reason,
>> but not the only one.
>
> I'm not questioning the reasons behind the shift; I'm just curious
> about what performance benefits it now allows.

Any code that invokes `car' or `cdr' can now cache the value without
doing further analysis.  Calls to car and cdr can now be re-ordered
without further analysis.

-- 
~jrm


Posted on the users mailing list.