On 30.11.2012 19:24, Luca Risolia wrote:
> On 29/11/2012 19:40, Johannes Bauer wrote:
>> -Ofast doesn't change anything with g++ on 4.6.2, underlining the fact
>> that your "Just make sure to compile with optimizations on" was
>> ill-advised. Apparently older g++ versions don't inline this construct
>> for whatever reason.
>
> That is not true. A version of gcc older than yours does inlining when
> minimal optimizations are turned on:
Hmm, in any case, this shows that the OP should look closely, as it
apparently depends on some more factors -- I'm really curious why the
optimization is not happening on my system, actually. Since you're on
x86-32, I tried to compile with "-m32", but still I cannot get my g++ to
optimize the 'set' call. weird. Output of g++/uname at bottom.
Best regards,
Johannes
[~/tmp]: LC_ALL=C g++ -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.2/g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/opt/tmp-portage/portage/sys-devel/gcc-4.6.2/work/gcc-4.6.2/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.2
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.2
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.2/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.2/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-lto
--enable-nls --without-included-gettext --with-system-zlib
--disable-werror --enable-secureplt --enable-multilib
--disable-libmudflap --disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.2/python
--enable-checking=release --enable-java-awt=gtk
--enable-languages=c,c++,java,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-targets=all --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.6.2 p1.4, pie-0.5.0'
Thread model: posix
gcc version 4.6.2 (Gentoo 4.6.2 p1.4, pie-0.5.0)
[~/tmp]: uname -a
Linux joequad 3.3.7 #6 SMP PREEMPT Wed Nov 28 14:59:17 CET 2012 x86_64
Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz GenuineIntel GNU/Linux
--
>> Wo hattest Du das Beben nochmal GENAU vorhergesagt?
> Zumindest nicht öffentlich!
Ah, der neueste und bis heute genialste Streich unsere großen
Kosmologen: Die Geheim-Vorhersage.
- Karl Kaos über Rüdiger Thomas in dsa <hidbv3$om2$>
|