Browse thread
Estimating the size of the ocaml community
-
Yaron Minsky
-
Christopher A. Watford
-
Frédéric_Gava
-
skaller
-
Erik de Castro Lopo
- Olivier_Pérès
-
Thomas Fischbacher
-
Frédéric_Gava
-
Thomas Fischbacher
- Paul Snively
- josh
- Richard Jones
-
Jon Harrop
-
Michael Walter
-
Jon Harrop
- Damien Doligez
- Thomas Fischbacher
- Michael Walter
-
Radu Grigore
-
Gerd Stolpmann
- skaller
- Jon
-
Gerd Stolpmann
-
Jon Harrop
- Thomas Fischbacher
- Richard Jones
-
Michael Walter
- Ville-Pertti Keinonen
- Oliver Bandel
- Basile STARYNKEVITCH
-
Thomas Fischbacher
- ronniec95@l...
- skaller
- chris.danx
-
Frédéric_Gava
-
Erik de Castro Lopo
- sejourne_kevin
- Stefano Zacchiroli
-
skaller
-
Frédéric_Gava
- Kenneth Knowles
- Michael Jeffrey Tucker
- Richard Jones
- Nicolas Cannasse
- Evan Martin
- Eric Stokes
- chris.danx
- Sylvain LE GALL
- sejourne_kevin
- Sven Luther
- Johann Spies
-
Christopher A. Watford
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-06 (14:59) |
From: | skaller <skaller@u...> |
Subject: | Re: [Caml-list] The boon of static type checking |
On Sun, 2005-02-06 at 23:16, Gerd Stolpmann wrote: > For your problem, I would guess that a hash table (in phase 1) plus > sorting (in phase 2) is the relatively best solution (from your > description). That avoids a lot of overhead compared to Map, especially > memory management consumes much less time. If you know something of the distribution of your keys, which are strings, you can also make this much faster by indexing using some suitable monotonic function on the string prefix, and only sorting equivalent strings. EG, 64K word array of lists, indexed by first two bytes of the string, then 64K sorts. If your keys are not well distributed on the first two bytes, use a monotonic hashing function. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net