From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3NLJnWZ018027 for ; Sat, 23 Apr 2011 23:19:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4BAC9Cs03UnwcjkGdsb2JhbAClaBQBAQEBCQkNBxQEIYhwuDKDLgGCRwSSPQ X-IronPort-AV: E=Sophos;i="4.64,259,1301868000"; d="scan'208";a="93678384" Received: from relay.ptn-ipout01.plus.net ([212.159.7.35]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Apr 2011 23:19:23 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAG1Bs01UXebj/2dsb2JhbAClaHeIcLgqgy4BgkcEkj0 Received: from outmx01.plus.net ([84.93.230.227]) by relay.ptn-ipout01.plus.net with ESMTP; 23 Apr 2011 22:19:23 +0100 Received: from [80.229.123.248] (helo=WinEight) by outmx01.plus.net with esmtp (Exim) id 1QDkEc-0001js-FA; Sat, 23 Apr 2011 22:19:22 +0100 From: "Jon Harrop" To: "'Alexy Khrabrov'" , "'Eray Ozkural'" Cc: "'Caml List'" References: <76544177.594058.1303341821437.JavaMail.root@zmbs4.inria.fr> <4DAFE141.7080003@inria.fr> <4DAFF442.8000806@lexifi.com> <799994864.610698.1303412613509.JavaMail.root@zmbs4.inria.fr> <4DB136FB.6050302@inria.fr> <1303463512.8429.1344.camel@thinkpad> <97D08229-2871-42F1-A50D-8E85C6C2BE31@gmail.com> <7D1E1BE5-D04F-42FE-B36E-344E48792F8A@gmail.com> In-Reply-To: <7D1E1BE5-D04F-42FE-B36E-344E48792F8A@gmail.com> Date: Sat, 23 Apr 2011 22:18:54 +0100 Message-ID: <00fd01cc01fc$0d7c0640$287412c0$@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGysqgJwKmI/txTCyK2eidtAsi+eQFULt0GAef07xcBKFzyqQFeqoamAdEGoYICDnGJ+QGf6LYoAilTLUEBr3hiWpQltE0w Content-Language: en-gb Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p3NLJnWZ018027 Subject: RE: [Caml-list] Efficient OCaml multicore -- roadmap? Alexy wrote: > I'm not claiming that something is correct or not -- I'm just > saying that replacing map by pmap is easy, while rewriting > in MPI style is complex. Complex not only because you must pass information around by hand but also (in the absence of a shared heap, e.g. in OCaml) because you must deep copy your data structures in order to send them which turns O(1) pass-by-reference into O(n) pass-by-value and that, in turn, makes the performance of MPI code much harder to predict. > This is an obsolete urban legend.  JVM has the most mature > GC out there and computational performance often on par > with C when loaded and running. The JVM does have a very evolved GC and it can often yield competitive performance but it also has its fair share of deficiencies that can make it much harder than necessary to attain competitive performance. In this context, type erasure for generics and the lack of value types are major issues. These culminate in generic code doing far more allocation than necessary. Although this is partially offset by the JVM's GC there are still important situations (e.g. generic hash table) where the JVM is many times slower than alternatives like .NET (which uses reified generics and has value types): http://fsharpnews.blogspot.com/2010/05/java-vs-f.html > In my social networking benchmark... That's a very interesting benchmark! > Clojure's performance improves by leaps and bounds, e.g. > using primitives as efficiently as in Java, and I think OCaml > would benefit from a similar set of primitives -- Absolutely. There's no theoretical reason why this functionality could not be available from OCaml too but it is a major project and, as I said, nobody has enough motive to undertake it. > then it would be the most practical ML-style FP language, > the prize now in fact held by Scala. I'd like to see F# too. :-) Cheers, Jon.