From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A668BBC84 for ; Tue, 15 Mar 2005 22:03:44 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2FL3ihO000433 for ; Tue, 15 Mar 2005 22:03:44 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA22468 for ; Tue, 15 Mar 2005 22:03:43 +0100 (MET) From: padiolea@irisa.fr Received: from smtp.irisa.fr (smtp.irisa.fr [131.254.254.26]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2FL3hXl000430 for ; Tue, 15 Mar 2005 22:03:43 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost.irisa.fr (Postfix) with ESMTP id 6767CFAAD; Tue, 15 Mar 2005 22:03:43 +0100 (CET) Received: from smtp.irisa.fr ([131.254.254.26]) by localhost (meli.irisa.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19665-03; Tue, 15 Mar 2005 22:03:41 +0100 (CET) Received: from mail.irisa.fr (melo.irisa.fr [131.254.254.28]) by smtp.irisa.fr (Postfix) with ESMTP id 80041FA97; Tue, 15 Mar 2005 22:03:41 +0100 (CET) Received: from 131.254.50.45 (SquirrelMail authenticated user padiolea) by mail.irisa.fr with HTTP; Tue, 15 Mar 2005 22:03:41 +0100 (CET) Message-ID: <32977.131.254.50.45.1110920621.squirrel@mail.irisa.fr> In-Reply-To: <200503152036.45894.jon@ffconsultancy.com> References: <42363A86.6010309@1969.ws> <200503150859.55997.jon@ffconsultancy.com> <200503152036.45894.jon@ffconsultancy.com> Date: Tue, 15 Mar 2005 22:03:41 +0100 (CET) Subject: Re: [Caml-list] OCaml troll on Slashdot To: "Jon Harrop" Cc: caml-list@inria.fr User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: by amavisd-new at irisa.fr X-Miltered: at concorde with ID 42374DB0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42374DAF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; irisa:01 caml-list:01 ocaml:01 ocaml:01 timings:01 iirc:01 functionnal:01 sumii:01 functionnal:01 trolls:01 associative:01 trolls:01 caml-list:01 beginner's:01 beginners:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.2 required=5.0 tests=NO_REAL_NAME autolearn=disabled version=3.0.2 X-Spam-Level: > On Tuesday 15 March 2005 20:17, Yoann Padioleau wrote: >> I have made the obvious optimization which is to replace the assoc list >> by >> a Map (just changing 4 lines in the "troll" code), >> the ocaml version is then far far faster. >> >> But computing 7 by 7 with c++ take 1.5 sec and with >> ocaml 50.0 sec (but it is better than "more than 16 minutes"). > > I spent a little time on it but some Anonymous Coward has already done a > much > better job and posted the resulting code on Jacques Garrigue's website. > ;-) where ? > > I also posted the resulting timings on slashdot. IIRC, OCaml was less than > half as much code and ran in 1.66 times the time (if you unroll the most > time > consuming function a little). That's pretty much what I'd expect given > that > the problem is too simple and array-based to take much advantage of OCaml > and > functional programming. Yes but this ocaml code use array ? In that case it supports what the "troll" said, that is the resulting code is no more "functionnal". I agree with eijro sumii that ocaml is not just about functionnal programming but in the mind of many people advocating ocaml is advocating functionnal programming. I think the way to answer to those trolls is to teach them the way to do, in that case to use Map instead of associative list, and not to be pretentious and to tell that he is just a newbie. He is not a newbie, this garden optimization problem is not that simple. Perhaps the python/perl/ruby community are successful because they answer to those "trolls" who often then become the first advocater of the langage who in turn answer to other "trolls" which make the community bigger and bigger. I am an egoist so I dont really care that this guy use ocaml, but the more people use ocaml, the more I will have a chance to get a job where I am paid to code in caml :) > > -- > Dr Jon D Harrop, Flying Frog Consultancy Ltd. > Objective CAML for Scientists > http://www.ffconsultancy.com/products/ocaml_for_scientists > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >