From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 2159EBBAF for ; Sun, 1 Nov 2009 16:11:55 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmACAA807UrZSMDji2dsb2JhbACBT5oDAQEBCgsKBxEFvRSEOQQ X-IronPort-AV: E=Sophos;i="4.44,662,1249250400"; d="scan'208";a="49597408" Received: from fmmailgate02.web.de ([217.72.192.227]) by mail4-smtp-sop.national.inria.fr with ESMTP; 01 Nov 2009 16:11:54 +0100 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 0C2BE13CB4F6A; Sun, 1 Nov 2009 16:11:54 +0100 (CET) Received: from [95.208.117.111] (helo=frosties.localdomain) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #314) id 1N4c5x-0004Rs-00; Sun, 01 Nov 2009 16:11:53 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.69) (envelope-from ) id 1N4c5w-0004xS-VY; Sun, 01 Nov 2009 16:11:53 +0100 From: Goswin von Brederlow To: Richard Jones Cc: Goswin von Brederlow , caml-list@inria.fr Subject: Re: [Caml-list] Re: How to read different ints from a Bigarray? References: <87eiond3of.fsf@frosties.localdomain> <87639zd0m9.fsf@frosties.localdomain> <87tyxj5rkv.fsf@frosties.localdomain> <527cf6bc0910281548s53a00ec9s99402f4249b2d411@mail.gmail.com> <873a52wmu0.fsf@frosties.localdomain> <20091029122043.GA18905@annexia.org> <87iqdyb028.fsf@frosties.localdomain> <20091030203011.GA30746@annexia.org> Date: Sun, 01 Nov 2009 16:11:52 +0100 In-Reply-To: <20091030203011.GA30746@annexia.org> (Richard Jones's message of "Fri, 30 Oct 2009 20:30:11 +0000") Message-ID: <87tyxeqnyf.fsf@frosties.localdomain> User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.22 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX18jIbBl2lUODtKFDUGdubCIvPFHCYGA0U9mOXJs yoHZVHRdVYdX//lgilQ/xV69HrPeghfOQNA1pCTYOyXx7flQ+/ itfUyCOGY= X-Spam: no; 0.00; bigarray:01 0100,:01 syntax:01 statically:01 byte:01 ocaml:01 bigarray:01 compiler:01 2009:98 mfg:98 polymorphic:01 wrote:01 emit:01 ints:01 caml-list:01 Richard Jones writes: > On Thu, Oct 29, 2009 at 06:07:59PM +0100, Goswin von Brederlow wrote: >> I still can reuse a lot of this. Esspecially the syntax extension >> seems like a good idea. Maybe reduced to bytes instead of bits >> though. I don't intend to use such fine grained structures to need bit >> access. > > Take a close look at bitstring. In all the cases where it can > *statically* determine that accesses are on byte or larger boundaries, > it does *not* do any bitfiddling but uses the most efficient, direct C > calls possible. > > We really did spend a lot of time optimizing the bitmatch case. > > Rich. But C calls are still 33% slower than direct access in ocaml (if one doesn't use the polymorphic functions). What would be great would be to use whatever Bigarray uses to get the compiler to emit direct access to the data instead of C calls. Time to hit the source. MfG Goswin