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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Thread: 108717,a7c8692cac750b5e X-Google-Attributes: gid103376,gid115aec,gidf43e6,gid108717,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed.stanford.edu!sn-xit-03!sn-xit-08!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: CTips Newsgroups: comp.lang.ada,comp.realtime,comp.software-eng,comp.programming Subject: Re: 10 rules for benchmarking (was Re: Teaching new tricks to an old dog (C++ -->Ada)) Date: Sat, 12 Mar 2005 12:29:37 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <11369p5jrcc6835@corp.supernews.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en MIME-Version: 1.0 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> <113394jjvppao64@corp.supernews.com> <1133s3qnmqmbjfb@corp.supernews.com> <4232a9f7$0$26552$9b4e6d93@newsread4.arcor-online.net> In-Reply-To: <4232a9f7$0$26552$9b4e6d93@newsread4.arcor-online.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com Xref: g2news1.google.com comp.lang.ada:9240 comp.realtime:1372 comp.software-eng:4932 comp.programming:17873 Date: 2005-03-12T12:29:37-05:00 List-Id: Georg Bauhaus wrote: > CTips wrote: > >> Like I said, if one knows what one is doing (which he does) then one >> can disregard the rules. If one does not know what one is doing (which >> you don't) then one should follow the rules. > I agree. I was trying to point out that Ada's extra checking can come with performance costs. It may not be important in many applications, but when performance is at all a requirement, then Ada may be an inapprorpiate choice of languages. BTW: I was looking around - I couldn't find an Ada equivalent to the ISO C clock() routine. What is it? I can't believe that the Ada standard community would have been *that* oblivious to performance that they wouldn't put a performance measuring routine in the core specification. Oh, and just to illustrate another point about Ada, try running the Ada program equivalent to the following program: #define N 30000 #define N2 60000 void setup_array( int * x[N2], int p[N+1], int q[N+1] ) { int i; for( i = 0; i < N; i++ ) { x[i] = &p[i]; x[i+N] = &q[i]; } } void do_array( int * x[N2] ) { int i; int *p; for( i = 0; i < N2; i++ ) { p = x[i]; p[1] = i; } } int main(void) { int p[N+1]; int q[N+1]; int * x[N2]; int i; setup_array(x, p, q); for( i = 0; i < 10000; i++ ) { do_array(x); } return 0; }