This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/83022] malloc & memset -> calloc is not always an optimization


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83022

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Yes, this is a measurable degradation in going from gcc 4.9 -> 5.0 with myrocks
DB.  Apparently 25% more queries/sec with gcc 4.9 (I think it's from a
benchmark).  Profiling (by others) has fingered this optimization.

I am in the process of implementing a check to see if the only condition
between the malloc and memset is 'ptr != 0'.

I noticed the crazy default probabilities during investigating this.  I think
that's really a second-order problem.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]