[webkit-dev] Initializing String and AtomicString with literals

Maciej Stachowiak mjs at apple.com
Fri Aug 24 23:13:44 PDT 2012

On Aug 24, 2012, at 10:18 PM, Adam Barth <abarth at webkit.org> 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 a problem when the code is executed infrequently.
> ]]]
> That description isn't 100% clear to me, but my reading of it is that
> the ConstructFromLiteral version has the length of the string embedded
> at the call site and therefore makes the code faster by increases the
> code size.

I see. Maybe we can tweak the syntax to make it more clear that it's a size/speed tradeoff (wasn't obvious to me from the wiki or the source for the header).


More information about the webkit-dev mailing list