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 7844EBB91 for ; Sun, 23 Jan 2005 07:08:04 +0100 (CET) Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j0N683vW010947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 23 Jan 2005 07:08:04 +0100 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id j0N67l6W014467; Sun, 23 Jan 2005 01:07:52 -0500 (EST) Received: from [18.98.6.119] (WESTGATE-THREE-SEVENTY-FOUR.MIT.EDU [18.98.6.119]) (authenticated bits=0) (User authenticated as farr@ATHENA.MIT.EDU) by outgoing.mit.edu (8.12.4/8.12.4) with ESMTP id j0N67dsQ019464 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Sun, 23 Jan 2005 01:07:41 -0500 (EST) In-Reply-To: <20050123022713.GA4333@first.in-berlin.de> References: <3D3A6BF5-657B-11D9-A551-000393A34E82@mit.edu> <20050123022713.GA4333@first.in-berlin.de> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <10E46C0C-6D05-11D9-B4DD-000393A34E82@mit.edu> Content-Transfer-Encoding: 7bit Cc: caml-list@yquem.inria.fr From: "Will M. Farr" Subject: Re: [Caml-list] Ocaml sums the harmonic series -- four ways, four benchmarks: floating point performance Date: Sun, 23 Jan 2005 01:07:30 -0500 To: Oliver Bandel X-Pgp-Agent: GPGMail 1.0.2 X-Mailer: Apple Mail (2.619) X-Scanned-By: MIMEDefang 2.42 X-Miltered: at concorde with ID 41F33F43.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 hash:01 bytecode:01 bytecode:01 oliver:01 bandel:01 wrote:01 native-code:01 imho:01 oliver:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm running 10.3.7 -- I don't think there's any newer version. When I run harmonic4 as follows: time ./harmonic 1000000000 21.3005 real 1m3.764s user 1m0.590s sys 0m0.130s the above is what I get. I'm not sure why I'm not exactly 2x faster than you, but there's plenty of things which could affect that. Running the bytecode on my system gives: time ./harmonic.bc 1000000000 21.3005 real 11m51.239s user 11m11.600s sys 0m0.940s I would be pretty surprised to see the bytecode come even close to the native code version --- are you sure about the numbers on your system? Will On 22 Jan 2005, at 9:27 PM, Oliver Bandel wrote: > I tried harmonic4 on Powerbook G4, 400 MHz and the > native-code needs about 1 min 50s. > > The Bytecode for harmonic4 runs in about 1min 53 s. > > It seems that there is no real distinction between > bytecode and native code. At least on that system, > #or at least on that task. > > > I use Panther OS. It seems that it's more than twice as fast as your OS > (look at the processor frequency: 400 MHz on my PB G4, 800 MHz on > yours...). > > Which OS are you running? An older version of Mac-OS-X? Or Linux? > (which one?) > > Maybe you can speed-up your calculations a lot, when installing a > different > operating system on your computer. > > I didn't try the other implementations. > IMHO you can gain more performance easier, when > changing your OS. Easier than looking at some code optimizations...?! > (which you nevertheless can do too) > > > Ciao, > Oliver > > _______________________________________________ > 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin) iD8DBQFB8z8qjFCrhUweU3MRAn4FAKCM9oHCU3l/RY/Bm1+/3PzOiGPcSQCcCIku 3XIQ3tXUQQwtNPEfUzZoU3E= =ivpj -----END PGP SIGNATURE-----