Optimizing the vectors benchmark

tim18
Total Points:
68,747
Status Points:
68,747
Black Belt
November 8, 2008 10:41 AM PST
Rate
 
#2 Reply to #1
Quoting - Dmitriy V'jukov

It seems that there is a lot of valuable detailed information, but where are base non-optimized cases? I can't find them (I was looking into C++ sources).

There is no base non-optimized C++.  As I explained in more detail in my earlier paper, which was removed from the Intel sites (possibly on account of lack of interest), the C++ is derived from automatic translation of the original netlib Fortran.  The translation itself already introduces some source optimizations, some of which aren't typical of usual C or C++ practice. Almost by definition, it fits the quip about writing Fortran in any language.  Still, it doesn't make sense to compare in all cases the ability of C,C++ and Fortran compilers, nor to demonstrate OpenMP, on literal equivalents of the legacy Fortran, so I try to make the comparisons as fair as possible.

The purpose of the original, sometimes ugly, Fortran, was to test compilers of that era to see how much optimization they could perform.  In several cases, you might say I have perverted that purpose, by "improving" style, and sometimes introducing OpenMP.   The original authors were kind enough to agree to this use of their benchmark.

I don't have a personal position on whether the introduction of transform() could be considered an optimization.  g++ does very well with it, and icpc does well with some cases which g++ misses.  My personal position is not in favor of such use of transform() without vector classes, of which I present only a single example.  The re-organization of loops so as to fit accumulate(), inner_product(), and transform() is an important optimization, so I present both C and C++ versions of it.



Intel Software Network Forums Statistics

8470 users have contributed to 31601 threads and 100640 posts to date.
In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 153 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus