Results 1 to 9 of 9

Thread: Strange gcc4.3 results with paq8o8

  1. #1
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello everyone,
    I was playing around with different gcc 3.4 and gcc 4.3 optimization levels with paq8o8 on my AMD Athlon 3000+ (single core) running linux and found something strange.

    paq8o8 compression times for a 1.5 Meg text file.

    g++ v3.4 -O3 - 426.27 seconds
    g++ v4.3 -O3 - 450.00 seconds

    g++ v3.4 -O2 - 436.94 seconds
    g++ v4.3 -O2 - 382.21 seconds

    g++ v3.4 -O1 - 457.03 seconds
    g++ v4.3 -O1 - 375.09 seconds

    As you can see, with gcc3.4, the higher the optimization level, the faster the code, but with gcc 4.3 it is just the opposite, I get slower code the higher the optimization level. I didn't use any "march" options. I also didn't use any of paq8o8's assembly files, I just did a straight compile from the cpp code like this:
    g++ paq8o8.cpp -O3 -DUNIX -DNOASM -s -o paq8o8

    It is interesting though that the lowest optimized 4.3 code is much faster than the highly optimized 3.4 code.

    Has anyone seen results like this, or does anybody have any idea what's going on?

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,511
    Thanks
    746
    Thanked 668 Times in 361 Posts
    try to use -mtune for beginning

  3. #3
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Did I want to ask if there and a complete packet that allows to install the whole binary files of GCC 4.3.0?

  4. #4
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried it again using -mtune=athlon64, but I got the exact same results.

  5. #5
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I also tried the -mtune=athlon64-sse3 but it didn't seem to make any difference.

  6. #6
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,511
    Thanks
    746
    Thanked 668 Times in 361 Posts
    btw, if you will upload compiled bnaries, other people will be able to test it on their cpus

  7. #7
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have posted all 6 versions of paq8o8 (linux binaries) in a bzipped tar here:
    http://rapidshare.com/files/10133167...8.tar.bz2.html

    Just try them on any text file.

    Christian suggested that the anomaly might be due to overflowing of the CPU's instruction cache in paq8o8's tight loop. I'm interested to see other's results. My CPU has 512k L2 cache and I think a 64Kb data cache, and a 64Kb instruction cache.

  8. #8
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,511
    Thanks
    746
    Thanked 668 Times in 361 Posts
    Nania Francesco Antonio
    for windows: http://dbxdeadbeef.googlepages.com/gcc-4.3.0.tar.bz2

    i don't tried it. original russian message: http://rsdn.ru/Forum/message/2875747.flat.aspx

  9. #9
    Moderator

    Join Date
    May 2008
    Location
    Tristan da Cunha
    Posts
    2,034
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Thanks Bulat!

Similar Threads

  1. LLVM 2.6 released, quick try with paq8o8
    By Hahobas in forum The Off-Topic Lounge
    Replies: 1
    Last Post: 29th November 2009, 22:31
  2. strange behavior with precomp and full path name
    By SvenBent in forum Data Compression
    Replies: 9
    Last Post: 6th September 2009, 19:45
  3. PAQ8o8 threading observations
    By CodeMutant in forum Forum Archive
    Replies: 15
    Last Post: 18th February 2008, 11:02
  4. Paq8o8 - endless loop when BMPs are invalid
    By schnaader in forum Forum Archive
    Replies: 1
    Last Post: 20th December 2007, 13:57
  5. TC 5.1dev7x test results
    By LovePimple in forum Forum Archive
    Replies: 8
    Last Post: 23rd January 2007, 23:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •