caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Map efficiency?
@ 2003-11-04  7:59 Dustin Sallings
  2003-11-04  9:11 ` Jean-Christophe Filliatre
  2003-11-04  9:39 ` Christian Lindig
  0 siblings, 2 replies; 13+ messages in thread
From: Dustin Sallings @ 2003-11-04  7:59 UTC (permalink / raw)
  To: caml-list


	Should I expect Hashtbl to be more efficient than Map with the same 
key type?  I'm taking a small performance hit in a log processing app 
after turning a Hashtbl into a Map.

	This was a sample of 340,720 records.  There were that many finds and 
1,440 adds.  Since the Hashtbl is mutable, the add is in place and the 
usage is pretty straightforward.  In order to get Map to work the same 
way, I am using a reference to it everywhere.

	The times were actually very similar between the two, but I was kinda 
hoping Map would be faster.  :)

	Also, is there a particular reason Map is so, um, inaccessible to 
beginners?  Hashtbl's generic interface is much more inviting than 
Map's functorial-only interface, especially to those not terribly 
familiar with the module system.

-- 
Dustin Sallings

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-11-07 14:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-04  7:59 [Caml-list] Map efficiency? Dustin Sallings
2003-11-04  9:11 ` Jean-Christophe Filliatre
2003-11-04 10:00   ` Richard Jones
2003-11-04 19:58   ` Issac Trotts
2003-11-04  9:39 ` Christian Lindig
2003-11-04 18:14   ` Alex Baretta
2003-11-05  1:09     ` Nicolas Cannasse
2003-11-07  8:27     ` Jean-Christophe Filliatre
2003-11-07 11:39       ` Why are functors better? (Re: [Caml-list] Map efficiency?) Yaron M. Minsky
2003-11-07 14:02         ` Michael Hicks
2003-11-07 14:08         ` Fernando Alegre
2003-11-07 14:49       ` [Caml-list] Map efficiency? Florian Hars
2003-11-04 19:37   ` Dustin Sallings

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).