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: speed versus C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-10-07 (15:51)
From: Markus Mottl <mottl@m...>
Subject: Re: speed versus C
>    Incidentally, implementing a Vector in ocaml is slightly fiddly,
> because you have to keep valid pointers of the right type in even the
> unused part all the time.  This means o.a. delaying the creation of
> the underlying array until you have at least one element to put in it.

I have just finished implementing a fully featured efficient automatically
resizing array which gets rid of this problem (by using Obj.magic
internally, but the user of this module won't see this outside). Another
version treats integer and float arrays differently to exploit the fact
that values in it are unboxed. Even resizable strings can be used with it
(space and time efficiently).

You can also use customized resizing strategies which you can change
at runtime.

I am nearly ready testing the code now and will write some documentation
on it. I hope that it can be released sometime next week.

Best regards,
Markus Mottl

Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl