Subject: Re: [boost] Accelerating algorithms with SIMD - Segmented iterators and alternatives
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2010-10-12 15:15:52
joel falcou wrote:
>> It doesn't make sense for vector intrinsics compiled by C++ compiler
>> to outperform fortran compiled to vector instructions by the fortran
>> compiler. I know perfectly well that it is the same back end
>> compiler, but the difference is that with C++ the compiler can't
>> know which optimizations are safe that the fortran compiler can
>> easily make. As long as the embedded langauge allows the compiler
>> to make the assumptions needed to enable optimizations that the C++
>> compiler can't then the code it generates will outperform the C++
>> compiler even if it's the exact same backend compiler being used.
>> There is practically no way you can tell the C++ compiler which
>> assumptions are safe, there just aren't sufficient pragmas and flags
>> for that and even if there were they wouldn't be portable.
> Then you miss th epoint of what we are trying to do. We don't and
> never claimed to vectorize ANY random C++ code but instrumented code
> of ours.
> And in this case, we know we can because of the fact WE control
You can't have your cake and eat it too. If you leave the low level optimization to the C++ compiler you have to accept that it will punt when it can't be sure whether two pointers might be aliases, for example.
>I guess blaming the poster was so much more fun than actually requesting
>And all in all, I guess the fact than tryign to get innovation on this
>in a OS project is useless too ...
I wasn't trying to blame you for anything other than dismissing the JIT approach out of hand and my only intention was to get you to spend some time looking into this CT thing which looks quite promising. I'm not sure why you would get frustrated with participating in OS, but it's clear I've upset you, and the wise crack about being smarter than the guys who came up with CT was uncalled for--I apologize.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk