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
Re: [Caml-list] "super-compaction" of values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: [Caml-list] "super-compaction" of values
>From: Markus Mottl <>

>would return "la" unchanged but "lb" would now share the common structure
>with list_a (= la) (also when inserted in any other order).

Look for "hash-consing" in the (LISP) literature.  But doing it for
arbitrary types looks complex.

>  * Support automatic GC? Or should the user make sure that possible
>    administrative memory overhead is prevented by telling "'a t" that
>    some value need not be remembered for sharing with further values
>    anymore.  The "automatic" version is probably less efficient and
>    much more complicated.

Module Weak is here to help you solve this problem.

-- Damien
Bug reports:  FAQ:
To unsubscribe, mail  Archives: