Browse thread
[Caml-list] Accessing the nth element in a stream takes time quadratic in n
-
DURAK Berke
- Daniel de Rauglaudre
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel de Rauglaudre <daniel.de_rauglaudre@i...> |
| Subject: | Re: [Caml-list] Accessing the nth element in a stream takes time quadratic in n |
Hi, On Mon, Mar 05, 2001 at 11:50:55PM +0100, DURAK Berke wrote: > This happens when streams are defined recursively, as in > > let rec nat_stream n = [< 'n; nat_stream (n + 1) >] > > and the problem holds for streams built of channels or strings, too. Preprocess by camlp4o (add "-pp camlp4o" among the options of ocamlc or ocamlopt). The streams and stream parsers in OCaml parser are not optimized. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr