Pros and Cons of “dictionary mode”

前端 未结 3 638
广开言路
广开言路 2020-12-06 11:54

It is to my knowledge that with Javascript when you delete an entry on a object, at least with chrome it puts the object into \"dictionary mode\" or \"slow mode\"

E

3条回答
  •  悲哀的现实
    2020-12-06 12:52

    this article has some answers about how google's v8 handles object properties

    the article confirms that there are such things as slow and fast properties

    my guess is that if your property names change frequently the "Map" is a better way to go.

    https://v8.dev/blog/fast-properties

提交回复
热议问题