>
> I think I understand what you mean. Dictionary mode is faster when you
> want to use your object like a dictionary.
>

More generally, dictionary mode is faster for adding/removing/reconfiguring
properties (and, depending on circumstances, sometimes also for
reading/writing existing properties at high-degree polymorphic sites).


> However, if I were to delete a property of some important prototype lots
> of objects use, I'm guessing that would cause performance issues in the
> whole application.
>

*Modifying* prototypes in any way *can* have a widespread performance
impact, especially when it's done in the middle of execution. Depending on
circumstances, deleting a prototype's property might not be worse than
other modifications to that prototype. (Fun fact: we *currently *(there are
plans to change this) keep prototypes (almost) always in non-dictionary
mode, but modifying them is slow regardless.)


> On Thursday, February 15, 2018 at 12:01:55 AM UTC+2, Jakob Kummerow wrote:
>>
>> Probably not. There are exceptions, but I'm hesitating to be specific
>> because these are internal implementation details that can and will change
>> over time.
>>
>> Also, "fast" is relative. Dictionary mode exists because it is faster for
>> some operations. Shape-tracked objects are faster for other situations. For
>> complex use cases, it can be difficult to estimate which mode works better.
>>
>>
>> On Wed, Feb 14, 2018 at 12:47 PM Greg Rosenbaum <life....@gmail.com>
>> wrote:
>>
>>> I understand that I delete an object from a property, i.e.:
>>>
>>> delete obj.property
>>>
>>> It will enter dictionary mode. If I do this only once, and the object is
>>> used throughout the application, will it at some point become fast again?
>>>
>>> --
>>> --
>>> v8-users mailing list
>>> v8-u...@googlegroups.com
>>> 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 v8-users+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to