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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr 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 63863BC69 for ; Thu, 31 May 2007 11:24:12 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.239]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4V9OBFm029994 for ; Thu, 31 May 2007 11:24:12 +0200 Received: by wr-out-0506.google.com with SMTP id i28so85778wra for ; Thu, 31 May 2007 02:24:11 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=TRGpFSKc7IezzS+fXSUyq2xky85e/FA9Ek8WJ2A0Pb+ysEg09rafUyOrjXkavo5B9bEH7ya3yKEc7qkxT88nEEyZENeIOVqdDZGEtXGP31alTeiwi+BA47+IYoKEXxwsEcXEcKDF+550Rb8yIag5ZquHLsjM+h6qkPb2nJVf8GU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=d1Q8PXPrBlCr4emWrj1ipmHy2S8hyalniGA2+z/z/X0nMyMbLd5CEU0V8WL9f0QWI7u5yOJGyWyb0/qRU/PPBBuPPsYrzBHlqCTEa+hTydL9mgCGpiV9r5C/NtFTGHrbapcngxplKglXbAajuQCPVUghCpE+0QrpI6Lr7WdPkTM= Received: by 10.78.37.7 with SMTP id k7mr240048huk.1180603450248; Thu, 31 May 2007 02:24:10 -0700 (PDT) Received: by 10.78.90.19 with HTTP; Thu, 31 May 2007 02:24:10 -0700 (PDT) Message-ID: <5195a210705310224l3e92e17m6925a4a19a446c61@mail.gmail.com> Date: Thu, 31 May 2007 17:24:10 +0800 From: "Yuanchen Zhu" Sender: yuanchen.zhu@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Comparison of OCaml and MLton for numerics In-Reply-To: <200705311008.16662.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5195a210705302250u6a9e5adey4ed857480f9e5cd8@mail.gmail.com> <200705310717.01553.jon@ffconsultancy.com> <5195a210705310031n19f035e7sc5d96568e86496ae@mail.gmail.com> <200705311008.16662.jon@ffconsultancy.com> X-Google-Sender-Auth: 66a18b4c32f5b731 X-Miltered: at concorde with ID 465E943B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 unboxed:01 heap:01 caml-list:01 floats:02 floats:02 float:03 handles:03 zhu:04 comparison:04 coherent:04 complex:04 complex:04 computing:05 > > > As I can autogenerate my code, I would much rather the OCaml developers > > > concentrated on things that I cannot get around, like the lack of a > > > 32-bit float storage type and a more efficient internal representation of > > > complex numbers. > > > > That sounds very interesting. Could you elaborate or give an example? > > Complex numbers are unboxed in OCaml. If they were equivalent to a C struct > then performance would be much better. > > OCaml only handles 64-bit floats because there is no point in computing with > 32-bit floats any more. However, there is point in storing 32-bit floats as, > when you have a lot of them, your program uses half as much heap and is twice > as cache coherent. My ray tracer is an excellent example of a program that > can benefit from this. > Umm sorry. I mean the autogeneration part.