[libcxx] r180811 - This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.

Joerg Sonnenberger joerg at britannica.bec.de
Tue Apr 30 14:59:17 PDT 2013


On Tue, Apr 30, 2013 at 09:44:48PM -0000, Howard Hinnant wrote:
> Author: hhinnant
> Date: Tue Apr 30 16:44:48 2013
> New Revision: 180811
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=180811&view=rev
> Log:
> This patch introduces an alternative layout for basic_string which when
> the string is short, the data pointer will be word-aligned.  It can be
> activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT.

What are the relative advantages of either?

Joerg



More information about the cfe-commits mailing list