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: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: Guillaume Foliard Newsgroups: comp.lang.ada Subject: Re: Benchmark Ada, please Date: Sat, 05 Jul 2014 20:25:16 +0200 Organization: /\/\/\/ Message-ID: References: NNTP-Posting-Host: 5N227f1IERa0rAVWs/hFMg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.12.5 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:187379 Date: 2014-07-05T20:25:16+02:00 List-Id: Simon Wright wrote: > Guillaume Foliard writes: >> So the Ada version is significantly faster. I suppose it is mainly >> because the Ada compiler has vectorized more loops than the C++ compiler >> (add - ftree-vectorizer-verbose=2 to the above compilation commands to >> check by yourself). > > On Mac OS X (2.5 GHz Intel Core i5) I found the reverse, both with FSF > GCC 4.9.0 and GNAT GPL 2014; C++ took ~ 1s, Ada took ~ 2s. > > With GCC 4.9.0, gfortran was approximately the same as C++. > > Apple's C++ (Xcode 5.1.1) was approximately the same as GCC's. > > -ftree-vectorizer-verbose=2 had no effect with FSF GCC. That's strange, here are my results with GCC FSF 4.9.0: C++: Elapsed time is = 3.09426 Ada: Elapsed time is = 2.111398804 C++ improved a bit, while Ada degraded, still outperforming C++. Indeed under GCC FSF 4.9.0 the -ftree-vectorizer-verbose does not output any messages anymore. I have no clue why. -- Guillaume Foliard