Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
kahl@ist.unibw-muenchen.de
http://ist.unibw-muenchen.de/kahl/
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr