Do not cache long strings and avoid caching one-hit wonders.

This commit is contained in:
Stephen Chung
2023-03-31 10:41:55 +08:00
parent b102982d65
commit 5eaa4c5240
2 changed files with 7 additions and 7 deletions

View File

@@ -261,7 +261,7 @@ impl<'e, 's> ParseState<'e, 's> {
text: impl AsRef<str> + Into<ImmutableString>,
) -> ImmutableString {
self.interned_strings.get_with_mapper(
crate::engine::FN_GET,
b'g',
|s| crate::engine::make_getter(s.as_ref()).into(),
text,
)
@@ -276,7 +276,7 @@ impl<'e, 's> ParseState<'e, 's> {
text: impl AsRef<str> + Into<ImmutableString>,
) -> ImmutableString {
self.interned_strings.get_with_mapper(
crate::engine::FN_SET,
b's',
|s| crate::engine::make_setter(s.as_ref()).into(),
text,
)