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
Re: [Caml-list] How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-26 (01:34)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] How to do this properly with OCaml?
On Monday 25 July 2005 18:21, Ken Rose wrote:
> skaller wrote:
> > I would appreciate an officially supported variable
> > length array a lot: it can't be efficiently implemented
> > *without* Obj.magic.
> I must be missing something obvious.  What's wrong with map?

Map is several times slower (e.g. for 10^3 elements). There are timings of 
many important operations on various data structures in the optimisation 
chapter of my OCaml book.

Map is also not quite an extensible array because you'd have to handle the 
lookup values yourself. Does anyone have links to tree-based functional array 
implementations in OCaml?

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists