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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A88BCBBAF for ; Mon, 2 Nov 2009 17:11:29 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQDAJ6T7krZSMDdi2dsb2JhbACBUJoIAQEBCgsKBxEFwGaEPAQ X-IronPort-AV: E=Sophos;i="4.44,667,1249250400"; d="scan'208";a="39383078" Received: from fmmailgate01.web.de ([217.72.192.221]) by mail1-smtp-roc.national.inria.fr with ESMTP; 02 Nov 2009 17:11:29 +0100 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate01.web.de (Postfix) with ESMTP id CA02C136A9AD2; Mon, 2 Nov 2009 17:11:28 +0100 (CET) Received: from [95.208.117.111] (helo=frosties.localdomain) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #314) id 1N4zVA-0002mI-00; Mon, 02 Nov 2009 17:11:28 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.69) (envelope-from ) id 1N4zV9-0008H4-QH; Mon, 02 Nov 2009 17:11:27 +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: <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> <87tyxeqnyf.fsf@frosties.localdomain> <20091101195749.GA15428@annexia.org> Date: Mon, 02 Nov 2009 17:11:27 +0100 In-Reply-To: <20091101195749.GA15428@annexia.org> (Richard Jones's message of "Sun, 1 Nov 2009 19:57:49 +0000") Message-ID: <87bpjkyki8.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: V01U2FsdGVkX1+fledLAZUky1iDySbJVb9cd7dKGPxTVmLyCgmI /LxWZU5s2Glo16eVIuTYB92kE6vVPMPRt4MRKFiGuK74tenYXT 6vbqn5CMw= X-Spam: no; 0.00; bigarray:01 0100,:01 ocaml:01 bigarray:01 compiler:01 integers:01 byte:01 pervasives:01 compiler:01 emits:01 2009:98 mfg:98 polymorphic:01 wrote:01 inline:01 Richard Jones writes: > On Sun, Nov 01, 2009 at 04:11:52PM +0100, Goswin von Brederlow wrote: >> But C calls are still 33% slower than direct access in ocaml (if one >> doesn't use the polymorphic functions). > > Are you using noalloc calls? > > http://camltastic.blogspot.com/2008/08/tip-calling-c-functions-directly-with.html Yes. And I looked at the bigarray module and couldn't figure out how they differ from my own external function. Only difference I see is the leading "%" on the external name. What does that do? > I would love to see inline assembler supported by the compiler. > > Rich. And some primitive operations on integers like sign extending and byte swapping in the Pervasives module where the compiler emits cpu specific code instead of a caml/C call. MfG Goswin