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.
hparser: convert locations in increasing order
Summary: Converting locations in strictly increasing order dramatically improves location cache utilization and performance. Previously we were converting the parent start and end location before recursively converting the children. That means were were jumping from the start to end and then back to the middle instead of going in increasing order. Now we convert the parent start location first, convert the children recursively, and finally in the end convert the parent end location. In tests caching alone improved performance by 82%. The present change further improved performance by another 83%! The total improvement from both optimization was 234% (the new code is 3.34 times faster). Reviewed By: avp Differential Revision: D31044165 fbshipit-source-id: 06fa1aa2489fecc205d53e1f01d365dd1b8d40bf
- Loading branch information
1 parent
b4a7b1a
commit 760a22b
Showing
3 changed files
with
24 additions
and
17 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
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