From: Jon Harrop <jdh30@cam.ac.uk>
To: caml-list <caml-list@inria.fr>
Subject: Re: [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
Date: Sun, 25 Apr 2004 21:06:33 +0100 [thread overview]
Message-ID: <200404252106.34024.jdh30@cam.ac.uk> (raw)
In-Reply-To: <1082919271.3944.0.camel@qrnik>
On Sunday 25 April 2004 7:54 pm, Marcin 'Qrczak' Kowalczyk wrote:
> W liście z sob, 24-04-2004, godz. 05:46 +0100, Jon Harrop napisał:
> > I don't want the overhead of hash tables carrying around and updating an
> > int.
>
> But it already does it! (to know when to rehash)
Another int, then. ;-)
In case anyone is interested, my peeve about carrying the length of a list
around inside the list in the case of the STL came from my use of a data
structure for molecular dynamics: The atomic structure is described by
particle coordinates within a cubic box under periodic boundary conditions.
Conventionally, the box is partitioned into voxels so that you can lookup
neighbouring atoms efficiently. Each voxel contains a list of atoms within
the voxel. I was often using ~10^6 voxels, so the STL list was carrying 4Mb
of unecessary data with my data structure.
Thus, in the context of ocaml, I'd like to see "low-level" libraries which
carry as little as possible. This isn't just for cache coherence but also
because I think it is good design. If someone wants a Hashtbl which carries
(and updates) baggage around with it to save you from having to record things
yourself then they can create a "higher-level" implementation from the
original. So, in summary, I like Hashtbl just the way it is... lean and
mean. :-)
Cheers,
Jon.
PS: I tried to do the same thing in Mathematica but it can only pack the whole
(4-dimensions of my) nested list into an array, or none of it. :(
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-04-25 20:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-23 20:09 Oliver Bandel
2004-04-24 3:00 ` skaller
2004-04-24 4:46 ` Jon Harrop
2004-04-24 10:39 ` Oliver Bandel
2004-04-25 18:54 ` Marcin 'Qrczak' Kowalczyk
2004-04-25 20:06 ` Jon Harrop [this message]
2004-04-26 10:14 ` Richard Jones
2004-04-26 17:13 ` Jon Harrop
2004-04-24 6:42 ` Basile STARYNKEVITCH
2004-04-24 19:12 ` skaller
2004-04-24 8:56 ` Oliver Bandel
2004-04-23 20:09 Oliver Bandel
2004-04-23 20:09 Oliver Bandel
2004-04-23 20:10 Oliver Bandel
2004-04-23 20:10 Oliver Bandel
2004-04-24 7:30 ` Martin Jambon
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=200404252106.34024.jdh30@cam.ac.uk \
--to=jdh30@cam.ac.uk \
--cc=caml-list@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