Browse thread
[Caml-list] Map efficiency?
[
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: | -- (:) |
| From: | Dustin Sallings <dustin@s...> |
| Subject: | [Caml-list] Map efficiency? |
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