Re: speed versus C

From: Markus Mottl (mottl@miss.wu-wien.ac.at)
Date: Thu Oct 07 1999 - 17:25:34 MET DST


From: Markus Mottl <mottl@miss.wu-wien.ac.at>
Message-Id: <199910071425.QAA21666@miss.wu-wien.ac.at>
Subject: Re: speed versus C
To: williamc@dai.ed.ac.uk (William Chesters)
Date: Thu, 7 Oct 1999 16:25:34 +0100 (MET DST)
In-Reply-To: <199910061521.QAA02123@toy.william.bogus> from "William Chesters" at Oct 6, 99 04:21:05 pm

> 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



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:26 MET