From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p4RBoTit019011 for ; Fri, 27 May 2011 13:50:29 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvUGAK6O301ii1vKhWdsb2JhbAA+AwEShEmTMDGOIQEBAQoJDQcTBCKIcJxtjiQ8gjeETokbAQQFAYElg2yBBwSGY44bJopU X-IronPort-AV: E=Sophos;i="4.65,280,1304287200"; d="scan'208";a="84157239" Received: from nm1-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.202]) by mail3-smtp-sop.national.inria.fr with SMTP; 27 May 2011 13:50:23 +0200 Received: from [98.139.91.67] by nm1.bullet.mail.sp2.yahoo.com with NNFMP; 27 May 2011 11:50:22 -0000 Received: from [98.139.91.21] by tm7.bullet.mail.sp2.yahoo.com with NNFMP; 27 May 2011 11:50:22 -0000 Received: from [127.0.0.1] by omp1021.mail.sp2.yahoo.com with NNFMP; 27 May 2011 11:50:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 315748.28046.bm@omp1021.mail.sp2.yahoo.com Received: (qmail 75526 invoked by uid 60001); 27 May 2011 11:50:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1306497021; bh=NmQJkrZhIulLcmt+fa92LbBe7WgPmuRnZiF7ADlP/is=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YxwCTSRIBLyCyXFONgbIVz0W9mS1syq1QjSb2/PdV1tq5nA32v7PH3Z64zJcmdoBfofLbKXK2jhxOwUSjJ3vI68zkr5QDshLMRzKPblK2PAvnLEYhFADsgnbTW6VeqtPaeEI8wzdo429yZuD2WVw4/KqpKnCi5/J4bJCb8WyiIg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1z373DkOjur0Ku32Ee7HNhn26Rtv4Nrkdbpj5tIdg6XHrmknIaEJcOIQvY55fePT83fmjSK5SFPMYm58z5HDmp/LnwBja/+AMy318xyRpYKW9uW0ffGZ6BoLmEHdaWchDdA+E3GiHs+I9R1Cr7CHAy01zvosVgQkT22FwAZB280=; Message-ID: <833816.58675.qm@web111502.mail.gq1.yahoo.com> X-YMail-OSG: FbXUXioVM1ljSMtkm7eZ4cpIQ89TScjDGQJ74AMVxEG6IL8 5PSXdXOoc_ES5ALuuJVvA_osaQS2ip7_VclftmIE2oCQqbU9.Zu9X3CHaBsM VHLuRwjbQJePxa8_JxcXJCTaaUfZquuKIQiXP_4M7vPnZYhajRQnOYFipjgF DhXnn2_bfREY8.8g1XBC2FZ8h2aWTtF0Kie4PKsqwbUENlhdkGVFDHmvwwWq oaLoLESvzwbGNUxIOEtEvXkEBOnVs6kCrcOUZnC3GP_bs8C6_mHvUe3kGg8N UL1Mp.D12RXPNO64mSjU7zCmcpS35oA7x5htfgAnhpRb2YDHsbwZgrWUNdvf vzG8zB7Rfp9ERcSiaCdbPhbfJ.Jy6xMJSX82GuiDY5u7RQHyWvZHDp9lLg1Y 6xRSPis4RVCsx3A-- Received: from [213.205.70.212] by web111502.mail.gq1.yahoo.com via HTTP; Fri, 27 May 2011 04:50:21 PDT X-Mailer: YahooMailClassic/14.0.1 YahooMailWebService/0.8.111.304355 Date: Fri, 27 May 2011 04:50:21 -0700 (PDT) From: Dario Teixeira To: caml-list@inria.fr In-Reply-To: <707567.2845.qm@web111505.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p4RBoTit019011 Subject: Re: [Caml-list] Binary logarithm of a power of 2 Hi, > Still, my question is whether this is indeed the optimal solution. > Is there some penalty associated with invoking C functions that may > negate the supposed advantage of __builtin_ctz? Thank you, Till and Goswin, for your suggestions. Marking the stub as "noalloc" and removing the CAML_ boilerplate did result in a very noticeable speed up in the synthetic benchmarks I tried. Great! Cheers, Dario