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] Performance-cost of ^
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-29 (08:59)
From: Christian Lindig <lindig@e...>
Subject: Re: [Caml-list] Performance-cost of ^
On Wed, Mar 26, 2003 at 01:28:20PM +0100, Damien Doligez wrote:
> On Wednesday, March 26, 2003, at 10:52 AM, Oliver Bandel wrote:
> >I'm reading in a file linewise.  For some operations I need it as one
> >long string.
> >
> >How to acchieve this performant?  Is it ok to use ^ for a list of
> >lines (with  List.fold_right? or List.fold_left?)
> You should use String.concat.

What about using the Buffer module? It sounds like it was especially
designed to build up long strings.

-- Christian

Christian Lindig         http://www.eecs.harvard.edu/~lindig/

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners