From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7e15102eb14c0020 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.72.130 with SMTP id d2mr3548567pav.33.1349081563738; Mon, 01 Oct 2012 01:52:43 -0700 (PDT) Received: by 10.68.242.37 with SMTP id wn5mr3792912pbc.4.1349081563684; Mon, 01 Oct 2012 01:52:43 -0700 (PDT) Path: t10ni23592188pbh.0!nntp.google.com!kt20no5235636pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 1 Oct 2012 01:52:43 -0700 (PDT) In-Reply-To: <50694f43$0$6577$9b4e6d93@newsspool3.arcor-online.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=188.135.15.104; posting-account=g6PEmwoAAADhFsmVm6Epjviaw4MLU0b5 NNTP-Posting-Host: 188.135.15.104 References: <50673111$0$9505$9b4e6d93@newsspool1.arcor-online.net> <38594cbf-b52d-4002-8db9-410f55126a09@googlegroups.com> <50694f43$0$6577$9b4e6d93@newsspool3.arcor-online.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <036db9eb-36e8-4a2e-8832-cecd9f1f4e2d@googlegroups.com> Subject: Re: highest bit, statically determined From: Anatoly Chernyshev Injection-Date: Mon, 01 Oct 2012 08:52:43 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-10-01T01:52:43-07:00 List-Id: > > 68580000 1.687923000 > > 68580000 1.447859000 > > 68580000 24.481472000 Yes, that could be expected. Here's the draft lightning-fast version: procedure xx is last_bit_a: array(0..255) of natural:=(0|1=>0,2|3=>1,4..7=>2, 8..15=>3, 16..31=>4,32..63=>5, 64..127=>6, 128..255=>7); N:natural; begin ... Highest_Bit_In_Octet:=last_bit_a(N); ... end xx;