Platform specific optimizations acceptable?

James Perry james.perry@gmail.com
Mon Feb 7 22:57:00 GMT 2005


Hi there,

I'm wondering if major platform specific optimizations would be
accepted into the STL implementation. I'm thinking specifically of an
optimized std::valarray.

I have an implementation of std::valarray (unrelated to macstl) which
is vectorized; it currently uses SSE2 but could be easily adapted to
other platforms - it uses gcc's vector extensions. In my tests it is
about 4-5 times faster than the current valarray on arithmetic
expressions and about 1.5-2 times faster on operations such as sum.

I am interested in submitting it to libstdc++ when it's completed
(there still some significant missing components, such slices). But I
would like to know if such a large platform specific optimization
would even be considered for inclusion before I spend the time making
sure I've got the standard covered exactly and completely, :-)

Any thoughts/comments?

Thanks,
James Perry



More information about the Libstdc++ mailing list