Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
freeze_template_literals
option to avoid String#freeze
`"foo".freeze` generates an `opt_str_freeze` instruction while `"foo"` when frozen string literals is enabled generated a `putobject` instruction. The performance difference between the two is not that big, but it's still less work as it doesn't have to check wether String#freeze was redefined. It also generate much less native code with YJIT.
- Loading branch information
Showing
2 changed files
with
97 additions
and
4 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