C++ Logo

std-discussion

Advanced search

Re: extremely long compile time with large number of string literals

From: Mandeep Sandhu <mandeepsandhu.chd_at_[hidden]>
Date: Sat, 18 Jul 2020 09:44:02 -0700
> Ideally a constexpr string object using constexpr operator new could do that,
> but such a thing does not exist in C++ yet and definitely did not for C++11 or
> C++14.
>
> The best you can get until is to benefit from the Small String Optimisation.

What is the size threshold at which SSO kicks in? Is it implementation
defined? Is there a way to figure out if a string has been "SSO-ed" ?

The largest string in my case is 18 (lowest is 4). Wonder if SSO will
be applicable here.

-mandeep

>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel System Software Products
>
>
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

Received on 2020-07-18 11:47:31