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 594E67ED45 for ; Mon, 25 Jun 2012 15:05:38 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnkBAHdh6E/RVaG2kGdsb2JhbABEpUqQTggiAQEBAQkJDQcUBCOCGAEBAQQSAiwBGxILAQMMBgULDQ0hIgERAQUBChIGExIQh1oBAwsLmjsJA4wjgnGESgoZJwMKV4hxAQUMiyeGAgOVLoESiBSEfj6EAA X-IronPort-AV: E=Sophos;i="4.77,471,1336341600"; d="scan'208";a="164351474" Received: from mail-gg0-f182.google.com ([209.85.161.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Jun 2012 15:05:37 +0200 Received: by ggnm2 with SMTP id m2so4140670ggn.27 for ; Mon, 25 Jun 2012 06:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Qvdmot3arRDwUnLCWkzH/HrYpAvPQQj3CeJj8kl7DDo=; b=Mw1+ClD6WWjjs7eyQsFa3jl9hTwBKVp6c/sdttQAYSxAlOz6tjuYWlszCOcfW6T3yf zcYR1cYLDKd9sVMtCUI5kfXTlYl1DBuGTR92GEN0bS2FUmgZRbRdbPXagOOd0bqZOpF+ rfG4/ftcFoXP4nLQzQk4m3/aGoK8kQP6lwAfr6Go5Kd2HJgKSqFMMxRCrjNvi3MojzQR jknSoE4t6jb/pLDrQvxQaHW7S7skRYjI/fzAIPHz1sx6aQZE+Wg313JjfNjB6OkAY2qa dSunsdf/U+m9YN3xQRcFxtK5P+g8dpF+UK5XxgBRJdW5jyZk8oA0dR9fzjSiCZtUMxpx jx5w== Received: by 10.50.187.200 with SMTP id fu8mr7967906igc.6.1340629536476; Mon, 25 Jun 2012 06:05:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.94.39 with HTTP; Mon, 25 Jun 2012 06:04:56 -0700 (PDT) In-Reply-To: <20120625113936.GE1837@siouxsie> References: <20120624211840.124466j26yxz6rkg@webmail.in-berlin.de> <20120624.220220.2022399462583597382.Christophe.Troestler@umons.ac.be> <20120625113936.GE1837@siouxsie> From: Gabriel Scherer Date: Mon, 25 Jun 2012 15:04:56 +0200 Message-ID: To: oliver Cc: Diego Olivier Fernandez Pons , Lukasz Stafiniak , OCaml Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] print_int is too slow 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.). Why are we having this conversation? On Mon, Jun 25, 2012 at 1:39 PM, oliver wrote: > On Mon, Jun 25, 2012 at 02:09:47AM +0200, Diego Olivier Fernandez Pons wr= ote: > [...] >> There is a little trick however... I work mostly in combinatorial >> optimization. If your input takes more than 1s to read or write, it >> will take the age of the universe to solve given combinatorial >> algorithms are exponential in the input size. And there is little >> point in putting a printf on a branch-and-bound algorithm that opens >> 10^6 nodes. > [...] > > This looks like you really should use the Buffer-module. > > Ciao, > =A0 Oliver > > -- > Caml-list mailing list. =A0Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >