|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-06-02 05:50:13
On Thursday 02 June 2005 12:35, Gunter Winkler wrote:
> The results:
> $ g++ -g -I /home/a11aguwi/include/ -o vector_add vector_add.cpp -DNDEBUG
> -O2 -funroll-loops
> $ ./vector_add
> 2.9 (valarray)
> 2.97 (noalias)
> 2.93 (plus/minus_assign)
I ran the same program using gcc 3.4 -O3 and had strange results. valarray is
now slower but ublas is even faster ...
gcc 3.3
$ g++ -g -I /home/a11aguwi/include/ -o vector_add vector_add.cpp -DNDEBUG -O3
-funroll-loops
$ ./vector_add
2.9
2.97
2.96
gcc 3.4
a11aguwi_at_ares:~/PROJECT/ublastest$ g++-3.4 -g -I /home/a11aguwi/include/ -o
vector_add vector_add.cpp -DNDEBUG -O3 -funroll-loops
a11aguwi_at_ares:~/PROJECT/ublastest$ ./vector_add
3.74
2.67
2.62
mfg
Gunter