From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id F032ABBAF for ; Sat, 26 Sep 2009 18:44:35 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiYCADbhvUrUnwdklGdsb2JhbACCH5hjAQEBAQkLCAkTBLlfhB4F X-IronPort-AV: E=Sophos;i="4.44,457,1249250400"; d="scan'208";a="36893821" Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Sep 2009 18:44:35 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al0GALjhvUrUnw6R/2dsb2JhbACCH9MFhB4F Received: from ptb-relay01.plus.net ([212.159.14.145]) by relay.pcl-ipout02.plus.net with ESMTP; 26 Sep 2009 17:44:35 +0100 Received: from [87.114.87.187] (helo=leper.local) by ptb-relay01.plus.net with esmtp (Exim) id 1MraNu-0006GH-Ti for caml-list@yquem.inria.fr; Sat, 26 Sep 2009 17:44:35 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures Date: Sat, 26 Sep 2009 17:55:53 +0100 User-Agent: KMail/1.9.9 References: <200909241409.56894.jon@ffconsultancy.com> <20090925.130721.70227045.garrigue@math.nagoya-u.ac.jp> <200909252239.42656.jon@ffconsultancy.com> In-Reply-To: <200909252239.42656.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909261755.53185.jon@ffconsultancy.com> X-Plusnet-Relay: eecf5fa041eea4619b0f4fc8b3257ffc X-Spam: no; 0.00; ocaml:01 hashtables:01 ocaml:01 hashing:01 ocaml's:01 xavier's:01 coq:01 2009:98 2009:98 frog:98 polymorphic:01 wrote:01 wrote:01 caml-list:01 pairs:01 On Friday 25 September 2009 22:39:42 Jon Harrop wrote: > On Friday 25 September 2009 05:07:21 Jacques Garrigue wrote: > > Hashtables in Python are a basic feature of the language, > > and they are of course implemented in C. In ocaml, they are > > implemented in ocaml (except the hashing function, which has to be > > polymorphic), using an array of association lists! > > (Actually the pairs are flattened for better performance, but still) > > What is impressive is that you don't need any special optimization to > > get reasonably good performance. > > OCaml is 4x slower than F# on that benchmark... That was mapping int -> int where OCaml has the unfair advantage of optimal initial size. If you map float -> float and give F# an initial size then it is over 18x faster than OCaml. The reason is, of course, OCaml's data representation strategy that is optimized for Xavier's Coq. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e