From: Matthias Kretschmer <schreib_mir_du_spacken@gmx.de>
Subject: Re: Ada and vectorization
Date: Tue, 18 Jun 2002 22:12:35 +0200
Date: 2002-06-18T22:12:35+02:00 [thread overview]
Message-ID: <aeo47j$ah$06$1@news.t-online.com> (raw)
In-Reply-To: wccptyoxuw7.fsf@shell01.TheWorld.com
Robert A Duff wrote:
> Matthias Kretschmer <schreib_mir_du_spacken@gmx.de> writes:
>
>> maybe cheaper, but let me cite Dijkstra: "Are you quite sure that all
>> those bells and whistles, all those wonderful facilities of your
>> so-called powerful programming languages belong to the solution set
>> rather than to the problem set?"
>
> Buggy optimizers are part of my problem set, too.
sure :) - but hopefully this won't happen - but this could happen with any
piece of code of any language, if the optimizer/compiler is written poorly
>
> You're probably right in this case, but surely in *some* cases, it is
> appropriate to let the programmer give the compiler hints about how to
> optimize. The compiler is still doing the error-prone part (deciding
> whether the optimization is correct, and actually performing the
> transformation). The programmer is merely suggesting that the
> optimization is worthwhile.
>
> - Bob
Yeah, but the compiler should use it even the programmer isn't suggesting it
- if you look at pragma inline (so I do not know how gnat which I currently
only use handles this, but there are good examples that not only functions
or procedures which are told to be inlined are inlined to gain speed with,
e.g. Intel's C++ Compiler) - of course only if it is useful, which of
course means more performance (or regulated the more speed <-> more size
measurement about optimization flags or something).
As suggest in this thread using pragma for loops only isn't enough I think
(so making it complicated I think - bloating the language up), because if
you just think about something like:
a := a1*a2;
b := b1*b2;
c := c1*c2;
d := d1*d2
wouldn't be cool if it is vectorized? you may say, throw anything in an
array and then put it in a loop, but can't it happen, that these a,b,c and
d aren't related, so putting it together into one array wouldn't be very
wise.
And these situations could be achived without having these statements put
together somewhere in one procedure or something, think of these
inter-procedure optimization features of compilers like sun's c compiler
(sorry but I do not know much about available Ada compilers, so my examples
are from other languages adapter, but they aren't depended on c itself)
which are able to optimize code and vectorize it if useful even if some
frictions of code are written in other procedures/functions - this of
course includes some inlinening and the code is very useless if one wants
to debug - but who really cares how the code gets faster if one needs
speed? :)
Btw. are there Ada compilers available (beside gcc 3.1 - yes the backend is
capable of using the vector units of at least x86-based cpus as stated on
gcc.gnu.org) which currently use vectorization and/or inter-procedure
optimization?
--
Greetings
Matthias Kretschmer
next prev parent reply other threads:[~2002-06-18 20:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-16 9:56 Ada and vectorization Guillaume Foliard
2002-06-16 12:50 ` Dale Stanbrough
2002-06-16 20:07 ` Matthias Kretschmer
2002-06-16 22:38 ` Robert A Duff
2002-06-18 8:24 ` Matthias Kretschmer
2002-06-18 10:02 ` Dale Stanbrough
2002-06-18 16:21 ` Matthias Kretschmer
2002-06-18 19:13 ` Robert A Duff
2002-06-18 20:12 ` Matthias Kretschmer [this message]
2002-06-18 20:51 ` Guillaume Foliard
2002-06-19 4:28 ` Matthias Kretschmer
2002-06-18 20:13 ` Guillaume Foliard
2002-06-18 17:46 ` Ted Dennison
2002-06-16 22:45 ` Ted Dennison
2002-06-17 23:47 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox