[
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: | Damien Doligez <damien.doligez@i...> |
| Subject: | Re: AW: [Caml-list] generic Hashtbl.to_array |
On 2006-07-25, at 14:44, Christoph Bauer wrote: >> >> let to_array_4 t = >> let init = ref None in >> begin try Hashtbl.iter (fun k v -> init := Some (k,v); >> raise Exit) t > > My guess: hashtbl has to loop over the first empty buckets. > And this eats the cpu cycles. I guess that's correct, since you're doing your tests with a 100000-sized hash table that contains only one entry. I wouldn't call that a typical case. -- Damien