-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up interpreter number checks for binary operations
Summary: It can sometimes be more efficient to use a NaN check to test whether a `HermesValue` is a number than `isNumber`. Since we use NaN boxing, the former can be used as a conservative check for whether a given value is a number (at the expense of excluding actual NaNs). In particular, for binary operations, we can test both operands for NaN with a single comparison, since x86 and ARM have condition codes that will be set if either operand to a comparison is NaN. Reviewed By: tmikov Differential Revision: D65582078 fbshipit-source-id: c06e9686bcba8b675be91f1aa3f28109acc9a44d
- Loading branch information
1 parent
0308342
commit 18aa2ff
Showing
2 changed files
with
68 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters