Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » [Solved] Default compiler flags
[Solved] Default compiler flags [message #40147] |
Fri, 21 June 2013 09:57 |
keltor
Messages: 73 Registered: February 2012
|
Member |
|
|
Hello all,
I have been working on a program to make some numerical simulations. The other day, just for kicks, I decided to port a part of it into our beloved U++, simply because I like TheIde. I have witnessed, much to my dismay, that the program, compiled in U++, is slower than the exact same program compiled with Code::Blocks, almost by a factor of two!
Edit: Actually, I made a blunder: I was comparing 64-bit code to 32-bit. So it's not a factor of two, but it's still noticeable.
The reason, it seems, is simply that U++ adds default flags depending on the type of compilation (Optimal/Size/Speed) that interfere with the optimisations that I have selected myself. For instance, in Speed mode, U++ chooses -Gy (function-level optimisation), which seems to collide with my choice of -GA (whole-program optimisation). And sadly, it adds the default options at the end of the compilation command, thus overriding the ones I specify.
Does anyone know of a way to tame U++ into accepting my optimisations?
Thanks,
Kel
[Updated on: Tue, 01 October 2013 16:13] Report message to a moderator
|
|
|
Re: Default compiler flags [message #40152 is a reply to message #40147] |
Sun, 23 June 2013 19:02 |
|
keltor wrote on Fri, 21 June 2013 09:57 | And sadly, it adds the default options at the end of the compilation command, thus overriding the ones I specify.
Does anyone know of a way to tame U++ into accepting my optimisations?
Thanks,
Kel
|
Hi Kel,
Judging from a quick glance into the code in MscBuilder.icpp, I believe that the simplest way to force your optimizations would be to set them on package level. The compiler options set for package in Package organizer should be appended at the end of the command-line, thus overriding the previous arguments. I did not test it though, as I don't have windows
It might be actually wise to set such options only for the package(s) that contain computation heavy code, otherwise your whole binary might get way too big in size and/or take longer to compile.
There are other options too, but I guess that modifying TheIDE just to make it work is not something you'd really prefer
Best regards,
Honza
|
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Dec 04 16:35:16 CET 2024
Total time taken to generate the page: 0.02013 seconds
|