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 HAA10811; Tue, 8 Jun 2004 07:34:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA10552 for ; Tue, 8 Jun 2004 07:34:14 +0200 (MET DST) Received: from outbound28-2.lax.untd.com (outbound28-2.lax.untd.com [64.136.28.160]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i585YCSH023579 for ; Tue, 8 Jun 2004 07:34:13 +0200 Received: from outbound28-2.lax.untd.com (smtp01.lax.untd.com [10.130.24.121]) by smtpout02.lax.untd.com with SMTP id AABANLV7NAW93FF2 for (sender ); Mon, 7 Jun 2004 22:33:32 -0700 (PDT) Received: (qmail 12442 invoked from network); 8 Jun 2004 05:32:56 -0000 Received: from 66-52-243-31.sttl.dial.netzero.com (HELO vangogh) (66.52.243.31) by smtp01.lax.untd.com with SMTP; 8 Jun 2004 05:32:56 -0000 From: "Brandon J. Van Every" To: "caml" Subject: RE: [Caml-list] 32 bit floats, SSE instructions Date: Mon, 7 Jun 2004 22:42:41 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal In-Reply-To: <001c01c44ccf$964e4670$19b0e152@warp> X-ContentStamp: 15:7:3100212247 X-MAIL-INFO: 41dfb73a5bb73a4f7f3a6a931b27731e6a9e1e6a0f0e6a8ea38f4b X-UNTD-OriginStamp: CI84cOLHFqh7Zd2QWkwvEFvwyO3T/pIsPQZphDk9MRi98K9ALIWK66U+84+XENTb X-Miltered: at concorde with ID 40C54FD4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brandon:99 caml-list:01 floats:01 cannasse:01 boxing:01 runtime:01 unboxing:01 ocamlopt:01 high-level:01 boxing:01 -bits:01 vectors:01 repetitive:01 transitions:01 brandon:99 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Nicolas Cannasse wrote: > > The main problem with float's - whatever if they are 32 or 64 > bits - is > their boxing . OCaml runtime value representation is > efficient but a float - > even 32 bits - cannot be carried in a register as it could be in C. > (actually some unboxing can be performed locally by ocamlopt). This is > mainly because OCaml is an high-level language, with a > garbage collector, > and so needs to keep the track of what is being allocated in > an efficient > way. Did you imagine having an higher level programming > language for free ? Sounds like someone decided to pay for efficiency with uncleanliness. That is not the only way to pay for things. One could instead, for instance, pay with a more difficult implementation. > So yes maybe OCaml is not the best language to perform floating point > operations, although the cost of boxing is actually quite > small compared to > the power of implementing easily more efficient algorithms. The old "ah, let the algorithm deal with it!" saw. Yawn. > That's why you > should perform batched operations in C - using 32bits float > if you want - > and manipulate your 64-bits vectors on the Ocaml side. Since when are all numeric problems batch problems? Batching in C is only practical when problems are simple and highly repetitive. What a 3D graphics guy often really wants, is the ability to inline a bunch of function "pipeline" stages into one fairly complicated function. The transitions between pipeline stages should all be optimized together. Cheers, www.indiegamedesign.com Brandon Van Every Seattle, WA "We live in a world of very bright people building crappy software with total shit for tools and process." - Ed Mckenzie --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.693 / Virus Database: 454 - Release Date: 5/31/2004 ------------------- 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