[builtins] Port WeakMap/WeakSet constructor to CSA
- Remove weak-collection.js - Adds TFJ builtins for WeakSet and WeakMap constructors - Unified helpers and constructor behavior into a BaseCollectionsAssembler - Fast paths for... - unmodified constructor function - argument is a fast JS array - entries are fast JS arrays, for Map/WeakMap - no arguments passed Quick benchmarks shows significant improvements (1.12x - 5.7x!) for ALL collection constructors (weak and non-weak): https://github.com/peterwmwong/v8-perf/blob/master/weakcollection-constructor/README.md More could be done for performance. Currently we always call out to JS to add entries, if we knew the prototype was unmodified, we could call the builtins directly. Bug: v8:5049, v8:6604 Change-Id: Id7912c1eed5bcf512df7fd6238f04166a8a5937e Reviewed-on: https://chromium-review.googlesource.com/760385Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#49343}
Showing
This diff is collapsed.
Please
register
or
sign in
to comment