Browse thread
[Caml-list] why does hashtbl not use lists?
[
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: | Xavier Leroy <xleroy@p...> |
| Subject: | Re: [Caml-list] why does hashtbl not use lists? |
> I thought about mentioning the time saving from the reduced number of > allocations, but then I wondered whether it would really save any time. > If you have a compacting garbage collector, as I'm pretty sure Ocaml does, > and a good compiler, then the compiler would be able to combine the two > allocations into a single one. Does Ocamlopt do that? Yes, it does. Still, you save two stores at allocation time with the flat representation -- in addition to the more significant time savings at access time (one fewer indirection). - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr