On 24-Nov-1998, Jan Skibinski <[EMAIL PROTECTED]> wrote:
> 
> On Tue, 24 Nov 1998, Lennart Augustsson wrote:
> 
> > I'm not sure what you're trying to accomplish.  If you want to
> > decide from a theoretical point of view which is the better
> > algorithm then you should do something more abstract.
> > If you're trying to decide which algorithm is better in a
> > certain situation then you should time it in that context.
> > Comparing reduction counts in Hugs will not help you much
> > if you ultimately want to run your code compiled with e.g. hbc.
> > Something which is better with one compiler can be worse
> > on another.
> 
>       I am simply trying to choose the best tool for certain
>       class of algorithms. 
>       Given a choice of Array, List and one of the varieties
>       of Random Accees List; and assuming that I am not doing
>       anything really stupid implementation-wise, such as using
>       indexing for Lists; the practical question is:
>       which of those data structures would give me the best
>       response time?

I suspect that array performance in Haskell is quite likely to be
strongly dependent on compiler optimizations.  Using Hugs for
performance comparisons may (or may not) give you reasonable results
for comparing List and Random Access List, but for comparisons with
Array I'd advise you use something that is close to what you will use
for the final implementation.

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger [EMAIL PROTECTED]        |     -- leaked Microsoft memo.


Reply via email to