Huge compilation time of template based sources (AIX 5.2, VA C++ 6 compiler)

Discussion in 'C++' started by vitalyt@gmail.com, Apr 18, 2006.

  1. Guest

    Hi,
    I have cpp file which consist nested templates. Compilation time
    without optimization is 1-2 minutes, with -O2 turned on more then 5
    hours. :( Could anybody help with that problem?
    AIX 5.2, Visual Age C++ 6 compiler

    #include <pair>
    using namespace std;
    // value
    typedef
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    std::pair
    <
    int,
    int
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >

    internal_value;
     
    , Apr 18, 2006
    #1
    1. Advertising

  2. wrote:
    > I have cpp file which consist nested templates. Compilation time
    > without optimization is 1-2 minutes, with -O2 turned on more then 5
    > hours. :( Could anybody help with that problem?
    > AIX 5.2, Visual Age C++ 6 compiler
    >
    > [..nested templates..]


    Have you tried contacting their Technical Support?

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Apr 18, 2006
    #2
    1. Advertising

  3. Guest

    of course
     
    , Apr 18, 2006
    #3
  4. wrote:
    > of course


    yes
     
    Victor Bazarov, Apr 18, 2006
    #4
  5. Default User Guest

    wrote:

    > of course


    Really?



    Brian

    --
    Please quote enough of the previous message for context. To do so from
    Google, click "show options" and use the Reply shown in the expanded
    header.
     
    Default User, Apr 18, 2006
    #5
  6. Re: Huge compilation time of template based sources (AIX 5.2, VAC++ 6 compiler)

    wrote:
    > of course
    >


    So, what did their Technical Support tell you about this?

    Regards,
    Peter Jansson
     
    Peter Jansson, Apr 18, 2006
    #6
  7. Fei Liu Guest

    wrote:
    > Hi,
    > I have cpp file which consist nested templates. Compilation time
    > without optimization is 1-2 minutes, with -O2 turned on more then 5
    > hours. :( Could anybody help with that problem?
    > AIX 5.2, Visual Age C++ 6 compiler
    >
    > #include <pair>
    > using namespace std;
    > // value
    > typedef
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > int
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >

    > internal_value;


    what do you use this ugly beast for?
     
    Fei Liu, Apr 20, 2006
    #7
  8. Bill Baka Guest

    Re: Huge compilation time of template based sources (AIX 5.2, VAC++ 6 compiler)

    Fei Liu wrote:
    > wrote:
    >> Hi,
    >> I have cpp file which consist nested templates. Compilation time
    >> without optimization is 1-2 minutes, with -O2 turned on more then 5
    >> hours. :( Could anybody help with that problem?
    >> AIX 5.2, Visual Age C++ 6 compiler
    >>
    >> #include <pair>
    >> using namespace std;
    >> // value
    >> typedef
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> std::pair
    >> <
    >> int,
    >> int
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >

    >> internal_value;

    >
    > what do you use this ugly beast for?
    >

    Too bad you can't compile on a DOS machine with huge ram drives. I have
    tried things, not quite this big, but the old stuff sure beats the new
    Windows junk. Even Linuxis getting a lot of bloat. I miss the good old
    days but not the slow computers with only 16 MB of memory.
    Bill Baka
     
    Bill Baka, Apr 21, 2006
    #8
  9. Jeff Flinn Guest

    wrote:
    > Hi,
    > I have cpp file which consist nested templates. Compilation time
    > without optimization is 1-2 minutes, with -O2 turned on more then 5
    > hours. :( Could anybody help with that problem?
    > AIX 5.2, Visual Age C++ 6 compiler
    >
    > #include <pair>
    > using namespace std;
    > // value
    > typedef
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <
    > int,
    > std::pair
    > <

    ....
    > std::pair
    > <
    > int,
    > int
    > >

    ....
    > >
    > >

    > internal_value;


    You might swith to boost::tuple or std::tri::tuple for such a beast, or even
    look at boost::mpl for alternatives that have been architected with compile
    efficiency in mind.

    Jeff Flinn
     
    Jeff Flinn, Apr 21, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. alban

    Compilation Problems on a AIX with XLC

    alban, Feb 8, 2006, in forum: C Programming
    Replies:
    6
    Views:
    895
    Jordan Abel
    Feb 9, 2006
  2. ClownPleco

    putenv for AIX and ifdef for AIX

    ClownPleco, Aug 22, 2007, in forum: C Programming
    Replies:
    5
    Views:
    1,145
    Thomas Dickey
    Aug 24, 2007
  3. Replies:
    3
    Views:
    510
  4. davide galassi

    c++ sources compilation at runtime

    davide galassi, May 5, 2010, in forum: C++
    Replies:
    8
    Views:
    1,972
    Öö Tiib
    May 5, 2010
  5. Replies:
    5
    Views:
    204
    Philippe Lucas
    Jul 8, 2005
Loading...

Share This Page