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
Optimize basic intercepted operations #2965
Comments
Set owner to ngeoffray@google.com. |
When the second argument is known, the helper should be specialized. $.ltB = function(a, b) { $.lt$slow = function(a, b) { ... This should be specialized, adding: $.ltB_0 = function(a) { if ($.ltB_0(index)) In my hand-optimizing experiments, the specialization was important, especially for the common cases (constants like 0, 1). Simply specializing on type leaves the JS engine with multiple representations for b. |
Removed this from the Later milestone. |
Added this to the M2 milestone. |
Removed Priority-Medium label. |
Removed this from the M2 milestone. |
This comment was originally written by @bp74 I have a lot of code where the compiler knows that the left and right side of the operation are integers, but operators like >> or ~/ are executed with the helper methods. In such cases the performance is much(!) slower compared to native (or inlined) JavaScript code. Another consequence is that the compiler does not know that the operation has no side effects, which kills optimizations like range analysis for indexers. |
Added TriageForM5 label. |
Is there anything left to do for this, Nicolas? Removed TriageForM5 label. |
This comment was originally written by ngeoffray@google.com Yes, we don't create specialized interceptors based on the argument type/value. Removed Type-Defect label. |
This comment was originally written by ngeoffray@google.com Set owner to @floitschG. |
Removed the owner. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Closing as obsolete - we don't do interceptors that way anymore. |
Right now, we're using certain non-inlined helpers for implementing the basic intercepted operations:
$.ge = function(a, b) {
if ($.checkNumbers(a, b) === true) {
return a >= b;
}
return a.operator$ge$1(b);
};
This needs to be faster (either through manual or automatic inlining of the helpers). This issue is related to issue #2964.
The text was updated successfully, but these errors were encountered: