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
large hash tables
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-02-20 (15:54)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] large hash tables
Zitat von John Caml <>:

> I need to load roughly 100 million items into a memory based hash
> table,
> where each key is an integer and each value is an integer and a
> float. Under
> C++ stdlib's map library, this requires 800 MB of memory. Under my
> naive

Did you tried Map-Module in OCaml?

Or would it need more mem than Hash-module per element?
At least there would be no resizing operations...

For my applications I have habitted myself to use Map
instead of Hash, and it worked quite good and performant
even on more or less large files.

BTW: how big are the files in use to need 800 MB memeory
     with the C++ implementation?