forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a lookup table for return opcode
Summary: Instead of generating a series of branches and relying on the compiler to do something efficient, we can eliminate the branches entirely by using a lookup table packed into a `uint32_t`. While this is slightly more expensive in terms of instructions, it produces no branches and results in a net perf win. Reviewed By: tmikov Differential Revision: D32229103 fbshipit-source-id: 9a332e51d0d910c41e4ee07e3146efbc61618a12
- Loading branch information
1 parent
afe1dd1
commit 2219f4c
Showing
1 changed file
with
39 additions
and
24 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