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 WAA14723; Fri, 23 Jul 2004 22:26:33 +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 WAA15499 for ; Fri, 23 Jul 2004 22:26:32 +0200 (MET DST) Received: from outbound28-2.lax.untd.com (outbound28-2.lax.untd.com [64.136.28.160]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i6NKQTEV013382 for ; Fri, 23 Jul 2004 22:26:30 +0200 Received: from outbound28-2.lax.untd.com (smtp03.lax.untd.com [10.130.24.123]) by smtpout06.lax.untd.com with SMTP id AABASC7CUAYE2PQA for (sender ); Fri, 23 Jul 2004 13:25:54 -0700 (PDT) Received: (qmail 5982 invoked from network); 23 Jul 2004 20:25:44 -0000 Received: from unknown (HELO vangogh) (66.52.250.50) by smtp03.lax.untd.com with SMTP; 23 Jul 2004 20:25:44 -0000 From: "Brandon J. Van Every" To: "caml" Subject: [Caml-list] Bigarray is a pig Date: Fri, 23 Jul 2004 13:36:08 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" 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.1441 Importance: Normal X-ContentStamp: 6:3:1830962977 X-UNTD-OriginStamp: CI84cOLHFqh7Zd2QWkwvEFvwyO3T/pIsFsCrOjjLH84b/fNefjn22WP3N28ZvGJY X-Miltered: at nez-perce with ID 41017476.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brandon:99 unboxed:01 anti-spam:99 caml-list:01 bayesian:01 crap:01 crap:01 bigarray:01 bigarray:01 ocaml:01 ocaml:01 opengl:02 overhead:03 wondering:04 array:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have been looking at the sources of the Bigarray implementation. I am chagrined to discover that not only does Bigarray cost a function call per array element access, but a number of additional piggish things happen per access. To C/C++ programmers interested in performance, this defeats the purpose of using unboxed array elements. If I wanted to pay function call overhead per element, for instance when communicating with OpenGL, I'd simply call functions. I am wondering if there is some way to present a block of C memory to OCaml, and then have OCaml use it directly? If so, I could envision writing up something I'd call 'Fastarray'. But I'm interested in any pitfalls you might see, such as range check requirements. In other news, I've been trying and trying to announce the next ML S*attle meeting on Tuesday, July 27th. E-mail me for details. These anti-spam filters are maddening. Cheers, www.indiegamedesign.com Brand*n Van Every S*attle, WA Praise Be to the caml-list Bayesian filter! It blesseth my postings, it is evil crap! evil crap! evil crap! ------------------- 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