From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id AF84DBBAF for ; Wed, 19 May 2010 15:27:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8DAMeD80vRVaE2mGdsb2JhbACRVYw4CBUBAQEBAQgJDAcRIq0PggCFSS6ITgEBAwWFCwSDOw X-IronPort-AV: E=Sophos;i="4.53,263,1272837600"; d="scan'208";a="50880123" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 May 2010 15:27:30 +0200 Received: by mail-fx0-f54.google.com with SMTP id 4so941820fxm.27 for ; Wed, 19 May 2010 06:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AhWRmzVNoeKtCcmnq0WbkcAWKcCZqYgV6AgY229+3KI=; b=Je7MPprsAn6XjaHnTXxXvoVexe2aoUOVMtyzcfPgs9EVnzaBfR5VynTG2DZaPxf7Pk TB71HuCTRuWkyu2V5NcyHLlFwlAASmw515d/TeNkc4CMIrFsEgQiQZYvZkEZ72iGCvGR LuuKsMLBQ/Dnj29+NK/rLB4qWDN4STD2VK0nY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=GkTvKLbeUUPy2sxScVZ2s2XFpBImXGCzwZEWxMdOdVJyqxVwjPgcJ+i9Spdp7l6cQX 7I0nENMLEMoAo+R9vj8hKeGyJRYn1Ogn0O15FpH7oheoQnz7n+7IPShFBmi9AwXB8DLf vA9NLNL7EpWCbjYCczg9EDjjpV0yK6wQyOK/M= MIME-Version: 1.0 Received: by 10.102.13.24 with SMTP id 24mr6607057mum.6.1274275649839; Wed, 19 May 2010 06:27:29 -0700 (PDT) Received: by 10.204.46.20 with HTTP; Wed, 19 May 2010 06:27:29 -0700 (PDT) In-Reply-To: References: <088201caf1ce$b5060cb0$1f122610$@com> <20100512151137.26894ywcpv71ixvk@imp.ovh.net> <012601caf351$e9a362e0$bcea28a0$@com> <44A730DD-54EB-4A1C-BD1A-6E9EFB31B5A2@x9c.fr> <01f001caf536$c923b4c0$5b6b1e40$@com> <20100517095327.14271x0lnao43sao@imp.ovh.net> <002001caf6e8$b408ed90$1c1ac8b0$@com> <20100519094634.63006zi1h04x95z4@imp.ovh.net> Date: Wed, 19 May 2010 16:27:29 +0300 Message-ID: Subject: Re: [Caml-list] Re: about OcamIL From: Eray Ozkural To: Michael Ekstrand Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; eray:01 ozkural:01 python's:01 hash:01 hash:01 amusing:01 bytecode:01 arrays:01 ocaml:01 bytecode:01 allocations:01 ocaml:01 eray:01 ozkural:01 bilkent:01 On Wed, May 19, 2010 at 2:29 PM, Michael Ekstrand wro= te: > > Yes, Python's hash tables are particularly optimized due to their wide > pervasive usage. =A0When you're testing Python hash tables, you're really > testing a carefully-written, thoroughly-tuned C implementation of hash > tables. The most amusing benchmarks are those with Java bytecode working on integer/float arrays. That is one place where Java has some admissible performance (comparable to ocaml bytecode?), but when you go to an algorithm that is more expensive than O(n) in time and makes more than O(n) dynamic memory allocations you will see how miserably Java fails. I unfortunately haven''t prepared any benchmarks for those, the info-retrieval, data mining and 3d-engine codes I had written in Java, well it would have been 10x-20x better if I had written them in C++ and a benchmark would be possible, but if anyone is interested I can surely post one of those codes, a clustering algorithm for Weka for instance. I suspect that the performance hit is a "feature" of JVM design, in addition to the Java language design. On the other hand, Jon's notion of high performance is valid I think. You want to be as close to the metal as possible. Otherwise there is no point in, say, writing a parallel version of the code. In the past we thought that was only possible with C and Fortran. Nowadays we think of C++ when we say that but I gladly find that ocaml is on par with any of those for real world tasks, without requiring tedious and cumbersome optimizations just to get it running (like in Java). That being said, I think getting anything to run on JVM is a remarkable achievement! It would have been so cool to be able to run ocaml code inside a web browser. :) There are unfortunately few alternatives for running code inside a browser. Best, --=20 Eray Ozkural, PhD candidate. Comp. Sci. Dept., Bilkent University, Ankara http://groups.yahoo.com/group/ai-philosophy http://myspace.com/arizanesil http://myspace.com/malfunct