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 (08:16)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] Help with simple ocaml memoization problem
On 11/28/07, Evan Klitzke <> wrote:
> On 11/28/07, Peng Zang <> wrote:
> > I don't know how to increase the stack size off the top of my head, but
> > in general you want to avoid recursion on the stack anyways.  An easy
> > way is to...
> Thanks Peng. This is much easier to grok than the code that I
> originally wrote! One question that I have is what is the difference
> between the Map and Hashtbl modules? From the documentation they look
> very similar -- why did you use Hashtbl here rather than Map?

Map is often slower (though hash tables potentially waste a lot of space and
will be slower if you get lots of collisions, of course) and the functorial
interface means that when "knocking" something together it's often tempting
to use Hashtbl immediately just to save typing!