
24 May
2005
24 May
'05
9:07 a.m.
On Tue, May 24, 2005 at 03:01:46PM +0200, Henning Thielemann wrote:
On Tue, 24 May 2005, Duncan Coutts wrote:
There is also the argument that an Int is always big enough to be used as an index into a data structure that can fit in memory. This also applies to 64 bit machines because the Int just gets bigger. And so the argument goes, if Int is sufficient then there is the performance advantage of simple machine integers.
A list can be infinite, the garbage collector can throw away nodes with small indices. So it is possible to access nodes above INT_MAX. E.g. x!!(1e10) will generate 1e10 nodes but not all of them are hold in memory.
Lists can be infinite, but not sequences, as the operations are strict.