English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] some profile data
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-26 (07:40)
From: Alain Frisch <Alain.Frisch@e...>
Subject: Re: [Caml-list] some profile data
On 26 Jun 2004, skaller wrote:

> This is curious enough to report: I use hash tables quite
> a bit, but i didn't quite expect this profile: 2/3 of ALL time
> doing comparisons??

You should be aware that the polymorphic compare function is slow (for
each block, it has to do a dispatch on the tag, etc...).  In general, it
is a good idea to write your own compare function for your types; it also
allows you to stop the recursive descent where you want (e.g. for
comparing only some fields). And this is a must if you have cyclic

-- Alain

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