From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id B28FEBC69 for ; Thu, 23 Aug 2007 01:04:21 +0200 (CEST) Received: from chokecherry.srv.cs.cmu.edu (CHOKECHERRY.SRV.CS.CMU.EDU [128.2.185.41]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7MN4J58017027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 23 Aug 2007 01:04:21 +0200 Received: from stratocaster.home (c-71-206-252-35.hsd1.pa.comcast.net [71.206.252.35]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id l7MN4JEZ001734 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 22 Aug 2007 19:04:19 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.67) (envelope-from ) id 1INzFK-0002we-Sk for caml-list@yquem.inria.fr; Wed, 22 Aug 2007 19:04:18 -0400 Date: Wed, 22 Aug 2007 19:04:18 -0400 From: Eric Cooper To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] commands.getoutput () in ocaml? Message-ID: <20070822230418.GC10505@stratocaster.home> Mail-Followup-To: caml-list@yquem.inria.fr References: <28fa90930708221256t497e8356k84861abd6b2e91b8@mail.gmail.com> <95513600708221535t7508e900h192554da73d37fcf@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95513600708221535t7508e900h192554da73d37fcf@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-11) X-Miltered: at discorde with ID 46CCC0F3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 0200,:01 andrieu:01 buffer:01 buffer:01 23,:98 wrote:01 caml-list:01 strings:01 string:02 string:02 thu:05 intermediate:05 intermediate:05 channel:06 On Thu, Aug 23, 2007 at 12:35:14AM +0200, Olivier Andrieu wrote: > you could use Buffer.add_substring instead of add_string, that will > avoid an intermediate copy of the string And you can use Buffer.add_channel to avoid intermediate strings altogether (until the final Buffer.to_string). -- Eric Cooper e c c @ c m u . e d u