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.
Speed up location finding by caching cur line
Summary: If locations are accessed in a natural left to right order, they will always be either in the current or the next line, which we can cache to avoid almost 100% of the lookups. That is more the case for Juno than for Hermes, but it should benefit Hermes too. Juno needs access to the whole line anyway, because it needs to operate with Unicode character indices, not byte offsets, so this kind of caching integrates naturally into that model. Reviewed By: avp Differential Revision: D30720707 fbshipit-source-id: 5fc68250fdf7d758d5a79ac0a012734a0bed8d1c
- Loading branch information
1 parent
b2da448
commit 1116dcf
Showing
5 changed files
with
215 additions
and
40 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
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