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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Large number of tasks slows down my program (using debian) - any fix? Date: Sat, 7 Apr 2018 10:15:35 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1aa8f536-250d-4bef-9392-4d936f916e5f@googlegroups.com> <9377f941-31d0-4260-818a-8e189aac8c19@googlegroups.com> <10e74e0c-119a-4d86-8a12-c05101f744f1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 7 Apr 2018 08:15:35 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="49324a93ff7ace8128c1aa0e3f81a704"; logging-data="11457"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6HYcJqEZlPFjZmPervnJXWtaNUpGb3l8=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:KXAdmonudoUkD07CCambB4bIOGk= Xref: reader02.eternal-september.org comp.lang.ada:51375 Date: 2018-04-07T10:15:35+02:00 List-Id: On 04/07/2018 06:39 AM, Brad Moore wrote: > > You are correct that technically the compiler would be right to complain here, > but I tried the code and compiled it exactly as presented on the website, and it compiles fine for me. > > What version of compiler are you using? Technically, it compiled with a warning that the call would raise Program_Error. I got the warning with a wavefront of GNAT Pro 18 under Linux. Running the program did result in the exception. > I tried your version of the code with my version of the compiler, but the times for both versions were almost identical. It sounds like your compiler is quite different from the one I am using. I am running under Linux on an AMD quadcore system. Interesting. I also tried my version with FSF GNAT 7.2.0 on a Core i7 with 4 virtual processors under Linux and got times about 6.6-9.6 s, depending on options. Fastest seems to be my default set of options -gnatan -gnato2 -O2 -fstack-check and the slowest -gnatp -gnat05 (compiler runs in Ada-12 mode by default). -- Jeff Carter "English bed-wetting types." Monty Python & the Holy Grail 15