mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
add CCTrie to benchmarks
This commit is contained in:
parent
e9a3cbdc62
commit
eee7b2318a
1 changed files with 10 additions and 0 deletions
|
|
@ -311,6 +311,15 @@ module Tbl = struct
|
||||||
end in
|
end in
|
||||||
(module U : INT_MUT)
|
(module U : INT_MUT)
|
||||||
|
|
||||||
|
let trie : (module MUT with type key = string) =
|
||||||
|
let module T = struct
|
||||||
|
let name = "trie(string)"
|
||||||
|
include CCTrie.String
|
||||||
|
let find = find_exn
|
||||||
|
end in
|
||||||
|
let module U = MUT_OF_IMMUT(T) in
|
||||||
|
(module U)
|
||||||
|
|
||||||
let hashtrie : type a. a key_type -> (module MUT with type key = a)
|
let hashtrie : type a. a key_type -> (module MUT with type key = a)
|
||||||
= fun k ->
|
= fun k ->
|
||||||
let (module K), name = arg_make k in
|
let (module K), name = arg_make k in
|
||||||
|
|
@ -351,6 +360,7 @@ module Tbl = struct
|
||||||
; wbt Str
|
; wbt Str
|
||||||
; hashtrie Str
|
; hashtrie Str
|
||||||
; hamt Str
|
; hamt Str
|
||||||
|
; trie
|
||||||
]
|
]
|
||||||
|
|
||||||
let bench_add n =
|
let bench_add n =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue