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 HAA08854; Tue, 10 Aug 2004 07:06:06 +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 HAA09959 for ; Tue, 10 Aug 2004 07:06:05 +0200 (MET DST) Received: from ensim.smartydns22.com (ev1s-67-15-74-65.ev1servers.net [67.15.74.65] (may be forged)) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7A562mL025451 for ; Tue, 10 Aug 2004 07:06:04 +0200 Received: from www.ivorykite.com (localhost.localdomain [127.0.0.1]) by ensim.smartydns22.com (8.12.10/8.12.10) with SMTP id i7A561fW032182 for ; Tue, 10 Aug 2004 15:06:01 +1000 Received: from 60.246.255.166 (SquirrelMail authenticated user effbiae@ivorykite.com) by www.ivorykite.com with HTTP; Tue, 10 Aug 2004 15:06:01 +1000 (EST) Message-ID: <49993.60.246.255.166.1092114361.squirrel@www.ivorykite.com> In-Reply-To: <37738.60.246.255.171.1091633896.squirrel@www.ivorykite.com> References: <36002.60.246.254.84.1091587147.squirrel@www.ivorykite.com> <36292.60.246.254.84.1091597068.squirrel@www.ivorykite.com> <44554.60.246.254.84.1091607496.squirrel@www.ivorykite.com> <4110B512.40108@kittown.com> <50714.60.246.254.84.1091615122.squirrel@www.ivorykite.com> <37738.60.246.255.171.1091633896.squirrel@www.ivorykite.com> Date: Tue, 10 Aug 2004 15:06:01 +1000 (EST) Subject: Re: [Caml-list] custom mmap modeled on bigarray From: "Jack Andrews" To: caml-list@inria.fr Reply-To: effbiae@ivorykite.com User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Miltered: at nez-perce with ID 411857BA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 modeled:01 argued:01 0011:99 1001:99 0101:99 ffi:01 slower:01 ffi:01 arrays:01 bigarray:01 bigarray:01 -bit:01 ocaml:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk i know the argument for developing first, optimizing later. i also know the arguments for not caring about fine-grain performance and to look at the big picture. i've argued both and seen where these arguments fail. consider compressed data as a bit stream from disk. say it has simple encoding: phrase := byte:, byte:, int[]: eg: 0x03 0x0a 0b1110 0011 1001 0100 1110 0101 1101 1100 | | + | +number-of-values +number-of-bits represents the sequence of 10 3-bit numbers: 111,000,111,001,010,011,100,101,110,111 now consider a sentence as sentence := | phrase, sentence without an enhanced FFI, ocaml will be considerably slower than C for uncompressing (and compressing). in my previous post, i suggest that some language primitives similar to %bigarray_ref_1 could be introduced to make ocaml comparable to C. i have investigated this possibility, and my suggestion is that %bigarray_ref is replaced by a primitive %ffi_ref and made public. then bigarray can be built on the more general %ffi_ref and developers have a fast means of accessing C arrays like mmap regions. if i spend time implementing %ffi_ref/set, is there any chance of it being incorporated into ocaml? thanks, jack ------------------- 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