[PATCH] D25624: Added 'inline' attribute to basic_string's destructor

Sebastian Pop via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 18:13:16 PDT 2016


sebpop added a comment.

In https://reviews.llvm.org/D25624#582731, @mehdi_amini wrote:

> I don't understand:
>
> 1. The motivation for this change


This is a change for performance: we have seen some benchmarks where inlining the string dtor brings performance up by 5%: from what I remember, there is a string ctor shortly followed by a dtor that could be optimized away if both the ctor and dtor are inlined.  We already committed the patch to do the ctor inlining, and that gave us some performance. This patch is what remains to get the rest of the performance by inlining the string dtor.

> 2. Why is this correct?

There seems to be a problem the patch uncovers, and we will investigate.
Thanks for pointing out this issue.


https://reviews.llvm.org/D25624





More information about the cfe-commits mailing list