Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Efficiency of 'a list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Falk Hueffner <falk.hueffner@s...>
Subject: Re: [Caml-list] Efficiency of 'a list
Eray Ozkural <> writes:

> To be precise, comparing an int list and int array we'll see that
> list occupies twice the same memory

Thrice, actually. AFAIK, lists behave exactly like

type 'a list =
| Cons of 'a * 'a list

and therefore require an extra header word that will keep the
enumeration number, allocation size and temporary GC information.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: