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
[Caml-list] Accessing the nth element in a stream takes time quadratic in n
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-07 (15:54)
From: kahl@h...
Subject: Re: [Caml-list] Accessing the nth element in a stream takes time quadratic in n

Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> wrote:

 > The streams and stream parsers in OCaml parser are not optimized.

I am surprised!

So that's why they allow you only
to go faster than nsgmls (C++),
but not faster than sgmls (C)!   ;-)

(I must admit that I usually have ``-inline 25'',
 and that the .o/.ml length ratio is unusually high
 for the stream parser module.

 The experimemnt was, in addition, with a not fully validating parser,
 and without part of the entity replacement complexities of SGML.

So I still am inclined to consider stream parsers as a fast
and useful alternative.
(But then I haven't tried to define streams recursively...)

The ocamllex/ocamlyacc implemented XML parser ``tony''
posted here quite a while ago could not compare, neither speed-wise,
nor in the size of files it could digest.
(I have never seen an update announcement of tony --- maybe I missed it.)

Wolfram Kahl
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr