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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 04DDFBC6B for ; Tue, 9 Oct 2007 00:21:56 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAN9KCkfAXQInh2dsb2JhbACORQEBAQgKKZRg X-IronPort-AV: E=Sophos;i="4.21,244,1188770400"; d="scan'208";a="2647043" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 09 Oct 2007 00:21:55 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l98MLrjN011893 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 9 Oct 2007 00:21:55 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALJJCkfa1uFinmdsb2JhbACORQEBAQEHBAYRGJRg X-IronPort-AV: E=Sophos;i="4.21,244,1188770400"; d="scan'208";a="2468549" Received: from smtp.syd.people.net.au ([218.214.225.98]) by mail1-smtp-roc.national.inria.fr with SMTP; 09 Oct 2007 00:21:52 +0200 Received: (qmail 32539 invoked from network); 8 Oct 2007 22:21:49 -0000 Received: from unknown (HELO hendrix.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 8 Oct 2007 22:21:49 -0000 Received: from hendrix (hendrix [192.168.200.99]) by hendrix.mega-nerd.net (Postfix) with SMTP id C388AAB4BA for ; Tue, 9 Oct 2007 08:21:46 +1000 (EST) Date: Tue, 9 Oct 2007 08:21:47 +1000 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Correct way of programming a CGI script Message-Id: <20071009082147.657017dc.mle+ocaml@mega-nerd.com> In-Reply-To: <1191879429.28011.27.camel@rosella.wigram> References: <1191859489.10162.16.camel@localhost.localdomain> <1191879429.28011.27.camel@rosella.wigram> Reply-To: caml-list@inria.fr Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed 2.4.5 (GTK+ 2.12.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 470AAD82.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 gerd:01 ocaml:01 christiansen:98 wrote:01 unix:01 caml-list:01 short:01 strings:01 strings:01 data:02 binary:02 idiomatic:02 string:02 string:02 skaller wrote: > Now Gerd, I would not call the claim nonsense. If you can't > use a data structure in a natural way, I'd say the claim indeed > has some weight. The original claim was: >> I heard that OCaml is particularly slow (and probably memory-inefficient) >> when it comes to string manipulation. What is the preferred way in handling >> strings (building long strings from short parts - something StringBuilder >> would be used in Java)? Does anybody have any experience concerning this >> kind of applications? ie comparing Ocaml string handling to Java and other web languages like php, perl, ruby and python. While I agree that yes, it is possible to write slow code in Ocaml (or any other language), I suspect that idiomatic Ocaml string handling compiled to a binary is just as fast if not faster than Java/Perl/Python/ Ruby/PHP/whatever. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Windows was created to keep stupid people away from UNIX." -- Tom Christiansen