[plt-scheme] PLT4 expectations

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 11 08:14:07 EDT 2008

At Tue, 11 Mar 2008 01:01:08 -0400, Doug Orleans wrote:
> Matthew Flatt writes:
>  > At Mon, 10 Mar 2008 14:34:49 +0000, "Paulo J. Matos" wrote:
>  > > The idea of PLT4 creating by default immutable pairs and the so, means
>  > > that it also opens the possibility for far more and better
>  > > optimizations in the compiler, right?
>  > 
>  > I doubt that there are many new optimization opportunities that matter
>  > in practice.
> 
> Well, you could make "list?" be O(1) instead of O(n), at a cost of one
> bit per cons cell.

Yes, `list?' is currently amortized constant time.

To avoid making `cons' more expensive, no bit is actually set until you
start using `list?' (which is why the cost has to be amortized to call
it constant time).

Matthew



Posted on the users mailing list.