POV-Ray : Newsgroups : povray.off-topic : compiling huge C++ files : Re: compiling huge C++ files Server Time
6 Sep 2024 19:19:45 EDT (-0400)
  Re: compiling huge C++ files  
From: Warp
Date: 3 Nov 2008 16:29:35
Message: <490f6d3f@news.povray.org>
Kevin Wampler <wampler+pov### [at] uwashingtonedu> wrote:
> I'm attempting to compile some auto-generated code, and am running into 
> problems with turning on optimization flags due to the large side of the 
> files generated (.cpp file is currently 25MB, and could be as large as 
> 200MB later).  There is no natural way to break this code into smaller 
> pieces and such large auto-generated files really are necessary, so I'm 
> stuck with having to compile some really huge C++ files.

  That's rather large. Are you sure it's the only way?

> 1) Is there any way to specify for g++ to only to use optimizations 
> which do not require a significant amount of storage to compute?

  If you run "info gcc" and the choose Invoking GCC > Optimize Options
you will get a detailed documentation of all the optimization flags gcc
supports. You can try turning then on one by one and see which ones
require significant amounts of memory and which ones don't.

> 2) Is there another compiler that works under linux (fedora 9) that 
> might handle this better?  I should be able to find a version of the 
> Intel compiler to use if someone has reason to think it'll perform better.

  I have no idea if it will perform better, but it doesn't hurt to try.

> 3) Can I change the format of the source code so that using g++ 
> optimizations isn't as necessary?  Most of the execution time is spent 
> in my auto-generated code, which looks something like this:

  Are you sure you can't precalculate things in your code generator?

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.