[PD] array copy speed test
Mathieu Bouchard
matju at artengine.ca
Wed Aug 2 04:36:10 CEST 2006
On Tue, 1 Aug 2006, james tittle wrote:
> ...sounds good: I've just been learning about templates and generic
> programming in general...on my to-do list, I've long dreamed of adding
> macstl (don't be fooled by the name, it supports altivec/sse/sse2)
> support to pd and friends: you might wanna take a look, it's just some
> headers :-)
I've been using manual (that is, non-gcc) loop unrolling since 2001 in
GridFlow, using macros, and indeed it's a lot faster than without
unrolling. You don't need C++ templates to do generic programming.
At one point I replaced part of the macros by C++ templates to make it
easier to swallow for C++ dudes. Turns out it's more complicated and it's
not any faster and then there are still macros left for doing the things
that C++ templates just can't do. The only alternative for the remaining
macros is to copy and paste.
Btw GridFlow doesn't do much SIMD and has some problems with alignment,
which may explain some of its speed problems... but GridFlow surely does
nice loop-unrolling.
(note: Recent versions of GCC do better loop-unrolling on their own than
GCC 2.95 did back when I started)
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-list
mailing list