-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce string allocations on hot parse path.
When waiting for input we pass down strings for a possible error message and the triggering location. In generated code these are always literals. With this patch we do not take them as owning strings, but instead as views into existing strings to minimize allocations. In the case of error messages the created low-level exception objects already had used string_views, so this also aligns the APIs. Closes #1589.
- Loading branch information
Showing
2 changed files
with
10 additions
and
9 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