Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

List bms and give instructions in README.

  • Loading branch information...
commit df4f1bf2b421af85bb66665965fe435fb4b7ce3e 1 parent dc431c7
@mfp authored
Showing with 50 additions and 0 deletions.
  1. +50 −0 README
View
50 README
@@ -1,2 +1,52 @@
Several finite map implementations in OCaml, head to head.
+
+Functional
+----------
+
+Trie_map: TST with coalesced constructor for nodes with and without values
+Trie_map_mod: TST with different constructors for leaves and inner nodes with
+ a value
+Ternary: TST with separate constructor for nodes with and without values
+ but no leaf constructor
+
+Imperative
+----------
+
+Fasthashtbl: hash table with open addressing and double hashing
+Hashtbl: the hash table from INRIA's stdlib (external chaining)
+Hashtbl_mod: Hashtbl with more aggressive resizing (lower load factor)
+Hashtbl_hval: Hashtbl_mod with caching of the hash value
+
+Requirements
+============
+* OMake
+* OCaml (any version should do)
+* ExtLib
+
+Compiling and running
+=====================
+
+$ omake
+
+$ ./benchmark -help
+
+ -n N Number of iterations (default: 3)
+ -s Show structure sizes.
+ -help Display this list of options
+ --help Display this list of options
+
+$ ./benchmark -n 10
+String set size: 98568
+Target array 1: 217625
+Target array 2: 86016
+
+Fasthashtbl:
+ ints
+ add 0.18055s (1205378 / sec)
+ struct size: 11124672
+ find (constant w/ overhead) 0.02775s (36040042 / sec)
+ find (constant, no overhead) 0.02312s (43250748 / sec)
+...
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.