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 7EABEBBAF for ; Fri, 6 Nov 2009 13:12:09 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwEAF+h80pQW+UMgWdsb2JhbACbbwEBFiRHAwEBwCeEPQSBZw X-IronPort-AV: E=Sophos;i="4.44,692,1249250400"; d="scan'208";a="37653369" Received: from lo.gmane.org ([80.91.229.12]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 06 Nov 2009 13:12:08 +0100 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N6Nfj-0001rx-CD for caml-list@inria.fr; Fri, 06 Nov 2009 13:12:07 +0100 Received: from ks300734.kimsufi.com ([91.121.65.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Nov 2009 13:12:07 +0100 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Nov 2009 13:12:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: ATS versus Ocaml Date: Fri, 6 Nov 2009 12:11:43 +0000 (UTC) Message-ID: References: <878wem75iq.fsf@fel.cvut.cz> <200911042025.34897.jon@ffconsultancy.com> <87y6mmc4nv.fsf@fel.cvut.cz> <200911042315.55304.jon@ffconsultancy.com> <87fx8reuvr.fsf_-_@fel.cvut.cz> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks300734.kimsufi.com User-Agent: slrn/pre1.0.0-11 (Linux) Sender: news X-Spam: no; 0.00; le-gall:01 ocaml:01 allocating:01 ocaml:01 allocations:01 2009:98 wrote:01 wrote:01 implemented:02 seems:03 preliminary:03 crashes:03 ugly:04 i'd:06 context:06 On 06-11-2009, Jan Kybic wrote: >> On Wednesday 04 November 2009 22:21:24 Jan Kybic wrote: >>> > and crashes rather than performance. Moreover, I would note that the >>> > performant ATS code out there seems to go to *great* lengths to avoid the >>> > GC whenever possible, so I suspect it is extremely slow in the context of >>> > heavily allocating code or many short-lived values (much like HLVM). For >>> >>> This will be easy to test. >> >> I'd like to know what you find in this respect. > > Here are my preliminary results. Please note that I am a beginner in > ATS so my ATS code is rather ugly. But it is a more or less direct > translation from Ocaml. I imagine the ATS results can be improved. > I have asked at the ATS list about that. > > I have implemented two benchmarks: > > - eight queens, I actually used ten. I believe the original Ocaml > implementation was probably yours. It uses lists as a primary > structure, so there is a lot of allocations. On this task, ATS needs > about 50% more time than Ocaml. > > - bubble sort on an array of doubles. Here ATS is more than 10 times > faster than Ocaml (for n=10000). > Are you using amd64 architecture ? Regards, Sylvain Le Gall