[Labs-l] [Wikitech-l] Maria DB

Platonides platonides at gmail.com
Thu Feb 14 17:10:57 UTC 2013


On 14/02/13 17:49, Petr Bena wrote:
> I wouldn't be so sure, this apply to non-optimized code, but if you
> enable optimizations in your compiler together with debug symbols
> producing, some optimizations may need to be disabled, which may result
> even in worse performance. <ref> 1 </ref>
> 
> But I don't really know how much is maria db depending on compiler
> optimizations so maybe this indeed is not a big problem. But from my own
> experience replacing debug build with optimized build has a significant
> performance improvements.
> 
> [1] -
> http://stackoverflow.com/questions/2880025/why-do-debug-symbols-so-adversely-affect-the-performance-of-threaded-application
> don't be confused by the wrongly asked question - the guy indeed had
> main problems because of profiling but if you read the table it say:
> 
> |Optimized no threading:        0m4.864s
> Optimized threading:           0m2.075s
> 
> Debug no threading (no-pg):    0m10.428s
> Debug threading (no-pg):       0m4.045s

I think that table misses "Debug optimized". I wouldn't rely on that. Do
you have some program -syntetical or real- for which adding -g (or
-ggdb) to a -O3 build slows it down?

I would like to see more that than a few numbers given by a guy with
little explanation, and the explanation of an unknown guy (no offense
intended) saying that enabling debug symbols means that the compiler
will perform less optimkization.
AFAIK the result would be the opposite one: optimizations will make the
debug symbols less useful (the compiler reorders code, some variables
may no longer be available when you connect with the debugger...) But
the compiler purposefully doing less optimizations because you included
debug symbols? Nope.



More information about the Labs-l mailing list