We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Object 当 Key 为有序连续的整数时,Object 的性能优于 Map(V8 对 Object 在键为有序连续正整数时做了优化)
V8 对 Object 的处理有优化手段; 当对象属性较少或者 Key 为数字类型时,会采用快属性,快属性使用线性结构存储。 当属性变多,为了确保新增跟删除的效率,会采用慢属性,使用键值对的方式存储属性内容。
当 Key 为字符串、非有序连续整数、Symbol 时 Map 的添加和读取性能优于 Object,修改和 删除操作性能相差不大;(Object 会把键转为 String 类型,消耗了一部分性能)
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: