G
Glen Low
I have written a new implemention of the std::valarray library that is
optimized to use Altivec (Apple's "Velocity Engine", part of the
PowerPC G4's in most Macintoshes and the announced IBM PPC 970). The
implementation is mostly standard conforming and is complete.
As soon as I get my shingle up on the web (1 or 2 day's time), I'll
post the library and its accompanying docs, which I call "MacSTL".
Would like comments, tests, discussions of it...
Preliminary benchmarks on my Power Mac G4 make it 550% faster on
inlined arithmetic, 1360% faster on inlined transcendentals and 290%
faster on summation than the gcc 3.1 std::valarray. Even the
non-Altivec-optimized inline arithmetic is 50% faster than gcc, due to
ruthless elimination of extrenous loads and stores by using STL-style
algorithms.
I sense that std::valarray is somewhat of a dead horse out there, but
I believe I can show there's still some life left in that concept. As
for Altivec, it's still up and coming!
P.S. The library also has several STL-influenced concepts for the Mac
(or BSD/PowerPC): std::vectors with Mach copy-on-write semantics,
clean COM wrappers using just std containers, zlib wrapped in std
iostreams...
optimized to use Altivec (Apple's "Velocity Engine", part of the
PowerPC G4's in most Macintoshes and the announced IBM PPC 970). The
implementation is mostly standard conforming and is complete.
As soon as I get my shingle up on the web (1 or 2 day's time), I'll
post the library and its accompanying docs, which I call "MacSTL".
Would like comments, tests, discussions of it...
Preliminary benchmarks on my Power Mac G4 make it 550% faster on
inlined arithmetic, 1360% faster on inlined transcendentals and 290%
faster on summation than the gcc 3.1 std::valarray. Even the
non-Altivec-optimized inline arithmetic is 50% faster than gcc, due to
ruthless elimination of extrenous loads and stores by using STL-style
algorithms.
I sense that std::valarray is somewhat of a dead horse out there, but
I believe I can show there's still some life left in that concept. As
for Altivec, it's still up and coming!
P.S. The library also has several STL-influenced concepts for the Mac
(or BSD/PowerPC): std::vectors with Mach copy-on-write semantics,
clean COM wrappers using just std containers, zlib wrapped in std
iostreams...