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=-1.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: 108717,a7c8692cac750b5e X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid115aec,gid108717,gidf43e6,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada,comp.realtime,comp.programming,comp.software-eng Subject: Re: 10 rules for benchmarking (was Re: Teaching new tricks to an old dog (C++ -->Ada)) From: Jim Rogers References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <112rs0bdr2aftdf@corp.supernews.com> <1inxxr988rxgg$.1w9dedak41k89.dlg@40tude.net> <112s1r0rf0o8nca@corp.supernews.com> <112sonip5v4dca6@corp.supernews.com> <112t3de6fu04f38@corp.supernews.com> <1110396477.596174.285520@o13g2000cwo.googlegroups.com> <112vb2t8eonuhed@corp.supernews.com> <1110422108.925127.54110@o13g2000cwo.googlegroups.com> <11329cb96h2p19f@corp.supernews.com> <1134l90ja5sqm73@corp.supernews.com> <39fr2iF5uq3mvU1@individual.net> <39g6jbF62g4qjU1@individual.net> Followup-To: comp.lang.ada,comp.realtime User-Agent: Xnews/5.04.25 Message-ID: Date: Sat, 12 Mar 2005 13:16:19 GMT NNTP-Posting-Host: 12.73.180.156 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1110633379 12.73.180.156 (Sat, 12 Mar 2005 13:16:19 GMT) NNTP-Posting-Date: Sat, 12 Mar 2005 13:16:19 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:9228 comp.realtime:1360 comp.programming:17864 comp.software-eng:4922 Date: 2005-03-12T13:16:19+00:00 List-Id: "Aslan Kral" wrote in news:39g6jbF62g4qjU1@individual.net: > > "Aslan Kral" , haber iletisinde �unlar� > yazd�:39fr2iF5uq3mvU1@individual.net... >> > IIRC, the C codes that were posted to find the highest bit set >> > thread were about 1/10th of that number. Just to double check, I >> > wrote and measured some C code. On my 3GHz Xeon running with cygwin >> > on WinXP, when compiled with gcc3.3.3 using -mpcu=i686 -O0, I got a >> > total run-time of 2.3s, for about 69 cycles/iteration, and with -O2 >> > I get 0.94s for about 28 cycles/iteration. >> > >> > > Oops! I failed to read the -O2 part. It makes sense now. And your code > doesn't use any lookup table that is why it is slower than Willem's. > Anyway the version with lookup table is quite close to "bsr" version. > So yours also can get faster with the addition of lookup table. It > would be interesting to see how much Ada can get close to "bsr" > version below! (By adding a lookup table, I mean.) > > __inline unsigned FindHighestBit(unsigned n) > { > __asm > { > bsr eax, n > } > } > . > I sems to have lost the C version of the lookup table. Could you please repost that or send me the version. Thanks. Jim Rogers