Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Efficiency of 'a list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-03 (18:44)
From: Mattias Waldau <mattias.waldau@a...>
Subject: RE: [Caml-list] Efficiency of 'a list
*** Do not use lists, there is always a better datastructure *** 

> From: Vitaly Lugovsky [] 
>  OCaml already have Hashtbl implementation.

I know Ocaml has hash tables. Ocaml has ALL the datastructures that are
needed to create efficient programs. However, lists are the data
structure that it easiest to use, since there is special syntax for it,
and therefor many novices use it.

The result of this is that you get all these questions in this forum
complaining about performance. Most of the questions would never have
been asked if the author would have used the correct datastructure,
mostly Hash/Map or Set.

The reason novices use them is that they think that since there is
special syntax for lists, this must be the preferred way. We all know
that it isn't the preferred solution.

I have been doing pure programming since MACLISP on the TOPS-20, and the
a large percentage of performance problems can be traced back to
IMAPPROPRIATE USE OF LISTS. Therefor my previous post where I
essentially say:

*** Do not use lists, there is always a better datastructure *** 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: