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 81F93BC48 for ; Tue, 15 Mar 2005 21:03:03 +0100 (CET) Received: from ryxa.irisa.fr (ryxa.irisa.fr [131.254.50.45]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2FK33pC026238 for ; Tue, 15 Mar 2005 21:03:03 +0100 Received: (from pad@localhost) by ryxa.irisa.fr (8.11.6/8.11.6) id j2FK2fJ02069; Tue, 15 Mar 2005 21:02:41 +0100 X-Authentication-Warning: ryxa.irisa.fr: pad set sender to padiolea@irisa.fr using -f Sender: pad@ryxa.irisa.fr To: YANG Shouxun Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OCaml troll on Slashdot References: <42363A86.6010309@1969.ws> <20050315092502.GA19351@furbychan.cocan.org> <200503151808.34994.yang.shx@fltrp.com> From: Yoann Padioleau Date: 15 Mar 2005 21:02:41 +0100 In-Reply-To: <200503151808.34994.yang.shx@fltrp.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 42373F77.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 irisa:01 shouxun:01 fltrp:01 ocaml:01 argv:01 ocamlopt:01 caml-list:01 beginner's:01 beginners:01 bug:01 rennes:01 irisa:01 shx:98 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: YANG Shouxun writes: > No. My experiments show that the OCaml implementation performs far better than > the C++ implementation when the column and row get larger: Perhaps because you are a liar. > > C++ is compiled with -O3, not sure what is the better optimization level, > while OCaml version (actually I used Sys.argv and references to the two > parameters) is compiled with ocamlopt > > 4x4 c++ > real 0m0.003s > user 0m0.002s > sys 0m0.002s > > 4x4 ocaml > real 0m0.177s > user 0m0.137s > sys 0m0.001s > > 8x8 c++ > real 0m8.703s > user 0m7.000s > sys 0m0.018s > > 8x8 ocaml > real 0m0.747s > user 0m0.485s > sys 0m0.002s I dont know where you get those numbers ? I tried the code of the "troll" and the ocaml version performs far _worse_ than the c++ implementation when the column and row get larger. > > 12x12 c++ > the process was killed by the OS > > 12x12 ocaml > real 0m1.210s > user 0m0.886s > sys 0m0.001s > > _______________________________________________ > 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 > -- Yoann Padioleau, INSA de Rennes, France www.irisa.fr/prive/padiolea/ Opinions expressed here are only mine. Je n'écris qu'à titre personnel. **____ Get Free. Be Smart. Simply use Linux and Free Software. ____**