From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA32239; Sat, 29 Mar 2003 09:59:27 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA13220 for ; Sat, 29 Mar 2003 09:59:26 +0100 (MET) Received: from mx01.nexgo.de (mx01.nexgo.de [151.189.8.96]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2T8xP513910 for ; Sat, 29 Mar 2003 09:59:25 +0100 (MET) Received: from lindig.dyndns.org (dialin-145-254-148-192.arcor-ip.net [145.254.148.192]) by mx01.nexgo.de (Postfix) with ESMTP id 09F263BCE6; Sat, 29 Mar 2003 09:59:24 +0100 (CET) Received: by lindig.dyndns.org (Postfix, from userid 1002) id 031013DBB; Fri, 28 Mar 2003 17:21:10 +0100 (CET) Date: Fri, 28 Mar 2003 17:21:10 +0100 From: Christian Lindig To: oliver@first.in-berlin.de Cc: Caml Mailing List Subject: Re: [Caml-list] Performance-cost of ^ Message-ID: <20030328162110.GB548@eecs.harvard.edu> Mail-Followup-To: Christian Lindig , oliver@first.in-berlin.de, Caml Mailing List References: <20030326095209.GA579@first.in-berlin.de> <6E2CBEC7-5F86-11D7-B838-0003930FCE12@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6E2CBEC7-5F86-11D7-B838-0003930FCE12@inria.fr> X-No-Archive: yes X-URL: http://www.eecs.harvard.edu/~lindig/ User-Agent: Mutt/1.5.3i X-Spam: no; 0.00; lindig:01 caml-list:01 damien:01 oliver:01 bandel:01 buffer:01 doligez:01 module:03 string:03 wrote:03 eecs:03 strings:06 fold:07 i'm:07 0100,:08 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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