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
Help with simple ocaml memoization problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-11-29 (22:34)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Help with simple ocaml memoization problem
On Thursday 29 November 2007 08:58, Jean-Christophe Filliātre wrote:
> Jon Harrop wrote:
> > The Map implementation in the OCaml stdlib is also quite inefficient. I
> > did a little benchmark once and discovered that Maps actually waste more
> > space than Hashtbls.
> I find it unfair to compare an imperative and a persistence data
> structure for performances. Of course you are going to use some extra
> space if you need to keep old versions of the data stuctures valid.
> But you are sharing *a lot* among the various versions. So if you are
> manipulating several sets/maps with common ancestors at the same time,
> you are saving memory w.r.t. other data structures such as hash tables.

Incidentally, what are the pedagogical applications of shared maps?

Dr Jon D Harrop, Flying Frog Consultancy Ltd.