From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA01062; Thu, 10 Jun 2004 16:44:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA00654 for ; Thu, 10 Jun 2004 16:44:16 +0200 (MET DST) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5AEiEEV020078 for ; Thu, 10 Jun 2004 16:44:15 +0200 Received: from davidb by mail.davidb.org with local (Exim 3.36 #1 (Debian)) id 1BYQmY-0002yY-00; Thu, 10 Jun 2004 07:43:54 -0700 Date: Thu, 10 Jun 2004 07:43:54 -0700 From: David Brown To: Keith Wansbrough Cc: Nicolas Cannasse , "Brandon J. Van Every" , caml Subject: Re: [Caml-list] 32 bit floats, SSE instructions Message-ID: <20040610144354.GA11353@davidb.org> References: <001c01c44ccf$964e4670$19b0e152@warp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Miltered: at nez-perce with ID 40C873BE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 caml-list:01 floats:01 2004:99 floats:01 unboxing:01 haskell:01 high-level:01 model:01 slower:01 ocaml's:01 tradeoff:01 ffi:01 unboxing:01 compiler:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Jun 08, 2004 at 03:23:21PM +0100, Keith Wansbrough wrote: > Oh, come on. GHC has no problems with garbage-collecting floats in > the heap. It also has no problems unboxing them, and does a > reasonable job (IIRC) of storing them in registers, just as in C. > Haskell has both Float (32 bit) and Double (64 bit). Just because > OCaml doesn't handle them, doesn't mean no high-level programming > language can. GHC's execution model is also slower than ocaml's, and I'm not just referring to the lazy evaluation aspect. 31-bit tagged integers in ocaml is a great tradeoff for many applications. It allows the GC to be exact, but the compiler doesn't need to explicitly register all variables at every stack frame. Unfortunately, it forces 32-bit quantities to be boxed. GHC is also much easier to bind with C, both because of how FFI is done, and that 32-bit values are actually 32-bit values. BTW, GHC boxes almost everything, and leaves selective unboxing to the optimizer. Dave ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners