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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id C00DD7ED45 for ; Sun, 24 Jun 2012 21:48:48 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocBAMdu50/RVda2kGdsb2JhbABEtXQIIgEBAQEJCQ0HFAQjghkBAQQSAiwBGx0BAwwGBQs7IgERAQUBHAY1h1oBAwuaKAkDjCOCcYN7ChknDVeIcQEFDJEpA41ih0yJJoR+PoQA X-IronPort-AV: E=Sophos;i="4.77,467,1336341600"; d="scan'208";a="148593723" Received: from mail-ob0-f182.google.com ([209.85.214.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jun 2012 21:48:38 +0200 Received: by obbun3 with SMTP id un3so9573830obb.27 for ; Sun, 24 Jun 2012 12:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Sdpe+qszupGQMl5K1xqOGvMqrBGAiEi/NFj+J7/lZ5k=; b=MLNF6Y+2unKnS6yc0st3wYEk6l0Bnt+G+L+ihFczROL80bvY2CL9KbpxOO8Plg7xCK TNF5+tmbnujtuU63LboeaWO2KCtnpJOmUWbwviWdyRKi4SpIJvJaR+JqeEf8iT7O7RUM ZMEGsri5EWXd14rAxVRnDoD1nWYJe/4tGGBXDg/wOPF7SJ5ur1Cc0VWwwcLG8xdkQ8ou LtqqcVOjfG9PQV8dKKHPuqxhmCkSFk392tn0XtqxmnvNg6tEtaPAUbXRVJvFhaHuDhdI 2Enz55Y7+Kh+MakSr8v7u/L5dTIXMScj+IG4puGeBpXP+3QDav8mEnWNnnngM5Dwy+Z/ oCsA== MIME-Version: 1.0 Received: by 10.182.72.42 with SMTP id a10mr9628366obv.22.1340567317577; Sun, 24 Jun 2012 12:48:37 -0700 (PDT) Received: by 10.76.8.35 with HTTP; Sun, 24 Jun 2012 12:48:37 -0700 (PDT) In-Reply-To: References: <20120624211840.124466j26yxz6rkg@webmail.in-berlin.de> Date: Sun, 24 Jun 2012 21:48:37 +0200 Message-ID: From: Adrien To: Diego Olivier Fernandez Pons Cc: Oliver Bandel , Gabriel Scherer , caml-list Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] print_int is too slow For bigger strings, it could be interesting to use the Buffer module, and Buffer.output_buffer in particular. (as usual: benchmark first) Also, you can change the flushing behaviour iirc (each char, at newlines, or never flushed automatically). And also, writing to string (or buffer) and using the Unix module is probably what would give the most flexibility. -- Adrien Nader