and what about "valarray" ? I've read some negative comments about it, but it seems to be much faster and more memory efficient. No exception handling, no bound checks, ...

Lots of undefined...