The wiki might also note that:
String bar = ASCIILiteral("foo");
is not free. :) There is still a malloc() of a StringImpl under there.
On Mon, Aug 27, 2012 at 12:26 PM, Benjamin Poulain wrote:
> On Sun, Aug 26, 2012 at 10:15 AM, Ojan Vafai wrote:
>>
>> So, is the rule something like "Use ASC
On Sun, Aug 26, 2012 at 10:15 AM, Ojan Vafai wrote:
>
> So, is the rule something like "Use ASCIILiteral unless you can show
> improvement on a benchmark by using ConstructFromLiteral." Could you add
> some simple explanation like that to the wiki page? As someone who doesn't
> understand the impl
On Fri, Aug 24, 2012 at 11:19 PM, Benjamin Poulain wrote:
> On Fri, Aug 24, 2012 at 10:18 PM, Adam Barth wrote:
>
>> [[[
>> The difference between the version is if the length of the string is
>> included or not. Having the size given in the constructor makes the
>> constructor faster. Having the
On Fri, Aug 24, 2012 at 10:05 PM, Adam Barth wrote:
> Thanks! The wiki page is very helpful. I wonder if we should
> organize a hack-a-thon to deploy this pattern throughout WebKit. Is
> there a way the compiler could give us a list of all the code location
> we should update?
>
We may discov
On Fri, Aug 24, 2012 at 10:18 PM, Adam Barth wrote:
> [[[
> The difference between the version is if the length of the string is
> included or not. Having the size given in the constructor makes the
> constructor faster. Having the size also makes the code bigger, which
> is a problem when the co
On Aug 24, 2012, at 10:18 PM, Adam Barth wrote:
> The wiki page says:
>
> [[[
> The difference between the version is if the length of the string is
> included or not. Having the size given in the constructor makes the
> constructor faster. Having the size also makes the code bigger, which
> is
The wiki page says:
[[[
The difference between the version is if the length of the string is
included or not. Having the size given in the constructor makes the
constructor faster. Having the size also makes the code bigger, which
is a problem when the code is executed infrequently.
]]]
That desc
What's the difference between the ASCIILiteral and ConstructFromLiteral
versions?
- Maciej
On Aug 24, 2012, at 8:00 PM, Benjamin Poulain wrote:
> Dear webkit-dev,
>
>
> Some recent changes improved the way we can use string classes with literals.
>
> There are 3 new constructors for initi
Thanks! The wiki page is very helpful. I wonder if we should
organize a hack-a-thon to deploy this pattern throughout WebKit. Is
there a way the compiler could give us a list of all the code location
we should update?
Adam
On Fri, Aug 24, 2012 at 8:00 PM, Benjamin Poulain wrote:
> Dear webki
Dear webkit-dev,
Some recent changes improved the way we can use string classes with
literals.
There are 3 new constructors for initializing a string from a literal:
-String(ASCIILIteral):
http://trac.webkit.org/browser/trunk/Source/WTF/wtf/text/WTFString.h#L139
-String(const char[], ConstructFr
10 matches
Mail list logo