Deprecate simpleBind from V8 Extras |
|||
Issue descriptionThe simpleBind function exposed by V8 Extras was initially added to work around the terrible performance of Function.prototype.bind at that time. Nowadays Function.prototype.bind is significantly faster and optimized fully by TurboFan, so there's no need to have simpleBind anymore. Once the streams implementation is switched to Function#bind we can rip out simpleBind from V8.
,
Jan 31 2018
Looking at existing usages, I think we can just do s/v8.simpleBind(x, y)/x.bind(y)/ because we only use it at startup time, so we don't need to get a clean copy via uncurryThis.
,
Feb 1 2018
#2 Good point.
,
Feb 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ee5c39074ea39c67088feb73a01055e251b8b12 commit 8ee5c39074ea39c67088feb73a01055e251b8b12 Author: Adam Rice <ricea@chromium.org> Date: Mon Feb 05 10:12:28 2018 Streams: Stop using v8.simpleBind v8.simpleBind() is being removed. Use Function.prototype.bind() in the implementation of ReadableStream, WritableStream and TransformStream instead. Microbenchmarks show no measurable difference in performance. BUG= 807522 Change-Id: Iba031f222dad5ccea6e97d4aa14483d1c453d853 Reviewed-on: https://chromium-review.googlesource.com/898828 Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#534358} [modify] https://crrev.com/8ee5c39074ea39c67088feb73a01055e251b8b12/third_party/WebKit/Source/core/streams/CommonOperations.js [modify] https://crrev.com/8ee5c39074ea39c67088feb73a01055e251b8b12/third_party/WebKit/Source/core/streams/ReadableStream.js [modify] https://crrev.com/8ee5c39074ea39c67088feb73a01055e251b8b12/third_party/WebKit/Source/core/streams/TransformStream.js [modify] https://crrev.com/8ee5c39074ea39c67088feb73a01055e251b8b12/third_party/WebKit/Source/core/streams/WritableStream.js
,
Feb 5 2018
Thanks Adam for fixing the Blink side. Assigning to Mathias for the V8 side.
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/fefee7dc1b4717deaa362ad293bfdea248d8ae42 commit fefee7dc1b4717deaa362ad293bfdea248d8ae42 Author: Mathias Bynens <mathias@chromium.org> Date: Tue Feb 06 09:17:58 2018 [v8-extras] Remove `simpleBind` The `simpleBind` function exposed by V8 Extras was initially added to work around the terrible performance of `Function.prototype.bind` at the time. Nowadays `Function.prototype.bind` is significantly faster and fully optimized by TurboFan, however, so there’s no need for the `simpleBind` helper anymore. Bug: chromium:807522 Change-Id: I1a0456e2aa34f92a3c9a0234a812b660f969d016 Reviewed-on: https://chromium-review.googlesource.com/903164 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#51108} [modify] https://crrev.com/fefee7dc1b4717deaa362ad293bfdea248d8ae42/src/js/prologue.js [modify] https://crrev.com/fefee7dc1b4717deaa362ad293bfdea248d8ae42/test/cctest/test-extra.js
,
Feb 6 2018
Let’s file additional issues for any further V8 Extras cleanup. (For example, do we still need the Promise extras?) |
|||
►
Sign in to add a comment |
|||
Comment 1 by ricea@chromium.org
, Jan 31 2018