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 NAA08136; Wed, 26 Mar 2003 13:28:07 +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 NAA08622 for ; Wed, 26 Mar 2003 13:28:06 +0100 (MET) Received: from inria.fr (macaque.inria.fr [128.93.8.158]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2QCS5f10272 for ; Wed, 26 Mar 2003 13:28:05 +0100 (MET) Date: Wed, 26 Mar 2003 13:28:20 +0100 Subject: Re: [Caml-list] Performance-cost of ^ Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) From: Damien Doligez To: caml-list@inria.fr Content-Transfer-Encoding: 7bit In-Reply-To: <20030326095209.GA579@first.in-berlin.de> Message-Id: <6E2CBEC7-5F86-11D7-B838-0003930FCE12@inria.fr> X-Mailer: Apple Mail (2.551) X-Spam: no; 0.00; damien:01 caml-list:01 oliver:01 bandel:01 doligez:01 string:03 wrote:03 fold:07 i'm:07 operations:08 performant:13 inria:15 concat:16 file:18 26,:18 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. -- Damien ------------------- 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