From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 0CB4DBC29 for ; Sat, 6 Nov 2004 12:59:18 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iA6BxHsh011776 for ; Sat, 6 Nov 2004 12:59:17 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA05806 for ; Sat, 6 Nov 2004 12:59:17 +0100 (MET) Received: from mwinf0607.wanadoo.fr (smtp6.wanadoo.fr [193.252.22.25]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iA6BxG4o011772; Sat, 6 Nov 2004 12:59:17 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0607.wanadoo.fr (SMTP Server) with SMTP id D06EB18000FE; Sat, 6 Nov 2004 12:59:16 +0100 (CET) Received: from pegasos (AStrasbourg-251-1-33-179.w82-126.abo.wanadoo.fr [82.126.151.179]) by mwinf0607.wanadoo.fr (SMTP Server) with ESMTP id 8E77E18000FC; Sat, 6 Nov 2004 12:59:16 +0100 (CET) Received: from luther by pegasos with local (Exim 4.34) id 1CQPV4-0002rq-6q; Sat, 06 Nov 2004 13:16:58 +0100 Date: Sat, 6 Nov 2004 13:16:58 +0100 To: Xavier Leroy Cc: David McClain , caml Subject: Re: [Caml-list] 64-bit OCaml? Message-ID: <20041106121657.GA10970@pegasos> References: <00dd01c4c3b5$70525f80$0401000a@dylan> <20041106100630.GB26835@yquem.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20041106100630.GB26835@yquem.inria.fr> User-Agent: Mutt/1.5.6+20040907i From: Sven Luther X-Miltered: at nez-perce with ID 418CBC95.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 418CBC94.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 sven:01 luther:01 sven:01 luther:01 wrote:01 rebuilding:01 ocaml:01 compiler:01 bytecoded:01 gcc:01 gcc:01 ocamlopt:01 powerpc:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, Nov 06, 2004 at 11:06:30AM +0100, Xavier Leroy wrote: > > I just obtained a new iMac G5 here. My cursory understanding is that this is > > a 64 bit core processor. However, when I attempted to run config for > > rebuilding the OCaml system, it reports a 32 bit system. What can or must I > > do to coax OCaml to become a 64 bit system for this processor? > > As others have explained, the first thing you need is a 64-bit kernel > and a development environment (C compiler, linker, libraries) that > handles 64-bit code. The next release of Mac OS X is rumored to offer > all this. > > Once this is available, you should be able to compile the bytecoded > part of OCaml to 64-bit code using e.g. configure -cc "gcc -m64" > or whatever gcc options that select the generation of 64-bit apps. > > However, ocamlopt will not work out of the box. Some changes to the > asm code generator are required to produce 64-bit code. In the case > of the PowerPC, the changes are relatively small. Still, I can't > perform them until we have G5 machines at INRIA, which may take a while. > (Pretty much the only Apple hardware we buy are Powerbooks, and it's > unclear when G5 Powerbooks will be mainstream.) > > Also, the only situations where 64-bit code is beneficial are 1- large > integer arithmetic (bignums, crypto), and 2- exploiting more than 4 Gb > of RAM. In all other cases, 64-bit code is actually a waste, > since pointers occupy twice as much memory as with 32-bit code. > > So, I expect 64-bit computing to take off when machines commonly have > 4 Gb of RAM or more, which should take a few more years. Caml will > have no problems adapting to this trend, since it's 64-bit clean from > the start. (Caml Special Light, the ancestor of OCaml, was developed > circa 1995 on a 64-bit Alpha, then backported to 32-bit > architectures.) I expect that at that time our "tier 1" architectures > will be x86-64 and PPC-64. On this topic, is it imaginable that there will some day be some way to take advantage of altivec (or other vector units on other cpus) in ocaml ? This would be a much bigger advantage for powerpc than 64bit, altough i believe that if you had a native code target for a power3/power4/ppc970 cpu, you could tweak it to obtain an around 20-30 % spead increase, or that is what i hear from the linux ppc64 folk. Friendly, Sven Luther