-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
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
Bind implementation is slower when native in modern browsers #7408
Labels
Comments
Thanks for the report! JS engines didn't optimize fn.bind in past and we record that fact in comment. But JS engines are constantly evolving and our implementation is slower, haha. Since Function.prototype.bind is more used in JS world, I believe JS engines will optimize the native usage more, like this. It seems better to use native one. |
13 tasks
yyx990803
pushed a commit
that referenced
this issue
Mar 8, 2018
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
aJean
pushed a commit
to aJean/vue
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.5.13
Reproduction link
https://jsperf.com/vue-bind-perf
Steps to reproduce
Run tests across some modern browsers to see the result.
What is expected?
Custom bind implementation performance is the same level as native.
What is actually happening?
Custom bind implementation performance is lower than native.
Tested in:
I believe it is not an issue at all, but I think it is something which can be improved.
The text was updated successfully, but these errors were encountered: