http://trac.xiph.org/cgi-bin/trac.cgi/ticket/583 looking at why gcc4 could increase vorbis so much, i first had a look at the compiler options, and i saw -O20, as far as i know there is -O0, .. -O3 and -Os but no -O20. changing that to -O2 (patch attached) one gets close to the result of gcc-3.4. gcc3.4-O20.ogg 20423 gcc4-O20.ogg 54623 gcc4-O3.ogg 54623 gcc4-O2.ogg 20423 looking at the hexdump of gcc4-02.ogg and gcc3.4-020.ogg, they differ slightly, things like: -0000000 674f 5367 0200 0000 0000 0000 0000 0e8a -0000010 25e5 0000 0000 5b97 0de7 1e01 7601 726f +0000000 674f 5367 0200 0000 0000 0000 0000 fb5f +0000010 0bb0 0000 0000 6e2e af20 1e01 7601 726f luckily the wav files i get from oggdec do not differ. the question is now which part of -O3(which -O20 is in the end) causes this increase in vorbis and is it a bug in vorbis or in gcc4? j -------------- next part -------------- A non-text attachment was scrubbed... Name: vorbis-gcc4.patch Type: text/x-patch Size: 2348 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20050728/b4deab90/vorbis-gcc4.bin
>>>>> "j" == j <j@v2v.cc> writes:j> the question is now which part of -O3(which -O20 is in the end) j> causes this increase in vorbis and is it a bug in vorbis or in j> gcc4? In gcc3 -O3 only adds -finline-functions and -frename-registers to -O2. As of gcc 4.0.0 it adds -finline-functions, -funswitch- loops and -fgcse-after-reload. Since inline-functions wasn't causing the problem before gcc4, it probably isn't now either. I'd bet on -funswitch-loops. This is what gcc.info has to say about that option: ,---- -funswitch-loops | Move branches with loop invariant conditions out of the loop, | with duplicates of the loop on both branches (modified according | to result of the condition). `---- But give each possibility a test compile to see for sure. Incidently, was there any performance difference between the resulting binaries? -JimC -- James H. Cloos, Jr. <cloos@jhcloos.com>
Reasonably Related Threads
- speex cvs: 'EncState' has no member named 'frame'
- gcc-4.1: svn 10958 fix point build fails
- Centos6.4 routing problem
- No objectClass found in replPropertyMetaData
- FW: No objectClass found in replPropertyMetaData *(was thread :replication issues solved by adding GUID name ... )