caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] large hash tables
Date: Wed, 20 Feb 2008 16:54:11 +0100	[thread overview]
Message-ID: <1203522851.47bc4d2310d0c@webmail.in-berlin.de> (raw)
In-Reply-To: <33d2b3f70802191501v39346a56x4b1852b84d4067b4@mail.gmail.com>

Zitat von John Caml <camljohn42@gmail.com>:

> 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?


Ciao,
   Oliver


  parent reply	other threads:[~2008-02-20 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 23:01 John Caml
2008-02-19 23:34 ` [Caml-list] " Gabriel Kerneis
2008-02-19 23:36 ` Gerd Stolpmann
2008-02-19 23:51 ` Francois Rouaix
2008-02-20  9:37   ` Berke Durak
2008-02-20  9:56     ` Berke Durak
2008-02-20 12:48 ` Richard Jones
2008-02-20 15:54 ` Oliver Bandel [this message]
2008-02-21 22:45   ` John Caml
2008-02-22  0:33     ` Richard Jones
2008-02-24  5:39       ` John Caml
2008-02-22 14:19     ` Brian Hurt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1203522851.47bc4d2310d0c@webmail.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).