I'd use kInternalized for strings that will be used as property names, and
kNormal for strings that will be processed further (concatenated, sliced,
replaced, printed, ...).

Internalized strings are more expensive to create, but make equality
comparisons faster (which object property lookups need to do under the hood
all the time).

When in doubt, kNormal is probably the safer default choice, as V8 will
internalize strings as needed. Creating a string directly as kInternalized
can be a useful hint when you know for sure that it makes sense to
internalize it.

On Fri, Sep 25, 2015 at 2:45 AM, Jane Chen <[email protected]> wrote:

> I'm looking for documentation on the subject.  When am I supposed to use
> one over the other?
>
> Thanks in advance.
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to