From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id CBF907ED45 for ; Mon, 25 Jun 2012 16:25:39 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsUEACh06E/AbSoIe2dsb2JhbABEhVqwUSIBAQsLCggUBCOCGAEBBAEjSgwFCwsJDwICJgICFBgxiBkFBKYPkjgUgQyKE4RwMmADjWKHS4kniTw X-IronPort-AV: E=Sophos;i="4.77,471,1336341600"; d="scan'208";a="164368376" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Jun 2012 16:25:39 +0200 X-Envelope-From: oliver@first.in-berlin.de Received: from first (e178018104.adsl.alicedsl.de [85.178.18.104]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id q5PEPb2i021071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 25 Jun 2012 16:25:38 +0200 Received: by first (Postfix, from userid 1000) id 82FC61540135; Mon, 25 Jun 2012 16:25:37 +0200 (CEST) Date: Mon, 25 Jun 2012 16:25:37 +0200 From: oliver To: Gabriel Scherer Cc: Diego Olivier Fernandez Pons , Lukasz Stafiniak , OCaml Mailing List Message-ID: <20120625142537.GB4794@siouxsie> References: <20120624211840.124466j26yxz6rkg@webmail.in-berlin.de> <20120624.220220.2022399462583597382.Christophe.Troestler@umons.ac.be> <20120625113936.GE1837@siouxsie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] print_int is too slow On Mon, Jun 25, 2012 at 03:04:56PM +0200, Gabriel Scherer wrote: > I don't see the point of using Buffer if he does not intend to > postprocess the output; why store the string in full? Just avoid > print_newline() if you don't want buffering, print_string "\n" will be > fine (or Printf.printf without %!, etc.). I answered on the topic of huge input data. I doubt that the example which was used here, with some printng-statements, will be used all the time. As it was mentioned, it is some OCaml learning stuff, and one day it might become more complex and the data read and written will be more. Then string-append in the reading part, wihout Buffer module will become a bottleneck. > Why are we having this conversation? Why are you asking this question? Ciao, Oliver