[bind10-dev] Default compiler flags?
Michal 'vorner' Vaner
michal.vaner at nic.cz
Fri Apr 8 08:17:29 UTC 2011
Hello
On Mon, Apr 04, 2011 at 02:10:52PM +0200, Shane Kerr wrote:
> I was thinking we should see if -Os makes more sense for our default
> optimization level than -O2. Also I noticed that -O3 works better than
> -O2 for clang in some cases. :)
Well, optimisation flags are usually dark arts, depending on the code written,
processor used, amount and speed of memory, etc.
Now, -Os is sometimes faster because it generates smaller code that better fits
into cache. In the case of C++ it's less often than with C, because stl relies
on inlining for reasonable performance, -Os makes the compiler more reluctant to
inline.
-O3 is generally better, but it can make the code grow a lot, it takes much
longer to compile and much more memory to compile. It is officially not
recommended to use for anything than the core loops and hot code. Maybe we could
compile something like the message rendering with -O3 and the „service“ code
with -Os, or something.
Anyway, provided that package maintainers will probably just change it to
whatever their whole distro uses, it's not that much important I guess.
With regards
--
How many Lisp programmers does it take to change a light bulb?
(((H)mmm,) (I'm ((not) sure, better))) (find (out))...
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20110408/a8c89231/attachment.bin>
More information about the bind10-dev
mailing list