Boost logo

Boost Users :

From: Grant Goodyear (grant_at_[hidden])
Date: 2005-08-01 15:39:59


We have a real-space convolution code that we noticed was running
notably slower in our c++ version than it was in our f90 version.
So, we extracted out the key part of the code and started seeing if we
could find a bottleneck. Removing multi_array_ref and using painful
pointer arithmetic seems to show that the multi_array_ref's are
the bottleneck:

bmb24 reconstruct > g++ -v
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/specs
Configured with: /var/tmp/portage/gcc-3.4.4/work/gcc-3.4.4/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.4
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.4/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include/g++-v3
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --disable-libunwind-exceptions
--enable-multilib --disable-libgcj --enable-languages=c,c++,f77
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8)
bmb24 reconstruct > g++ -O3 arraysimple.cpp
bmb24 reconstruct > time a.out
1.33693e+07
6.85547e+09

real9m40.203s
users9m8.390s
system0m1.889s
bmb24 reconstruct > g++ -O3 arraynoboost.cpp
bmb24 reconstruct > time a.out
1.33693e+07
6.85547e+09

real9m401m13.103s
users9m81m10.551s
system0m10m0.343s

Boost version: boost-1.32.0

Can anybody confirm these results, or suggest a fix?

Thanks,
Grant Goodyear

-- 
Grant Goodyear		
web: http://www.grantgoodyear.org	
e-mail: grant_at_[hidden]	





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net