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.6 required=5.0 tests=BAYES_05,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,213fbc70eb225c16 X-Google-Attributes: gid103376,public From: Rob Kirkbride Subject: Re: 'others' - inefficient esp. DEC Ada? [1/1] Date: 1997/10/13 Message-ID: #1/1 X-Deja-AN: 280188162 Distribution: world X-NNTP-Posting-Host: rk-comp.demon.co.uk [194.222.52.8] References: <+3g7rFB7dIQ0EwNI@RK-COMP.DEMON.CO.UK> <344168c5.21239761@SantaClara01.news.InterNex.Net> Organization: Bedrock Corp. Reply-To: Rob Kirkbride Newsgroups: comp.lang.ada Date: 1997-10-13T00:00:00+00:00 List-Id: In article <344168c5.21239761@SantaClara01.news.InterNex.Net>, Tom Moran writes >Testing your sample with two Ada 95 compilers on a Pentium 60, one of >them takes roughly twice as long for the "others" as for the loop and >the other compiler takes the same time either way (and looking at the >generated code, it's pretty nearly the same loop in both cases). > Why does copying 160*354 =56,640 bytes need a 3MB task stack? > On my P60 a single copy takes a couple of milliseconds. If your >program performs such large copies so often that the time matters, >perhaps this should be viewed as a golden opportunity to recode such >foolishness. > It certainly would be nice if each compiler came with a crib sheet >showing what it does especially well or poorly, instead of each >programmer having to discover for himself (usually painfully). Does >the standard Ada benchmark suite (whose name escapes me at the moment) >include an others/loop timing test? Sorry I had cut down Active_Errors_List_Range_Type from 160 to 7920! You may need to retry to get more representative figures. The clear is only actually done once (in this particular example). However, even once will still require the stack to be large which is why it is worse. The smaller ones will be having a less if still noticeable affect on performance. Having found this issue with the 'others' construct, I tend to agree with you about a benchmark program, I guess it would difficult to implement, but with all the pipelining and optimisation that can be done these days on processors I think it should become an issue. Rob -- Rob Kirkbride