Skip to content

perf: detect Latin1-encodable strings at intern time instead of per-c…#4896

Merged
jedel1043 merged 6 commits intoboa-dev:mainfrom
linisha15:perf/latin1-detection-at-intern-time-4881
Mar 13, 2026
Merged

perf: detect Latin1-encodable strings at intern time instead of per-c…#4896
jedel1043 merged 6 commits intoboa-dev:mainfrom
linisha15:perf/latin1-detection-at-intern-time-4881

Conversation

@linisha15
Copy link
Contributor

This Pull Request
closes #4881

Background-

When the bytecode compiler converts an interned string (Sym) to a JsString, it needs to decide whether to store it as Latin1 (1 byte per character) or UTF-16 (2 bytes per character). Previously, this was done by scanning every character of the string on each call — even if the same string was used many times.

What changed-

  • The Interner now checks once, at the moment a string is first stored, whether all its characters fit in Latin1 (code point ≤ U+00FF). The result is saved in a new latin1_flags field.

  • A new is_latin1(sym) method lets callers read that saved result instantly, without re-scanning the string.

  • ToJsString for Sym in both boa_ast and boa_engine::bytecompiler now calls is_latin1() instead of scanning the string's characters every time.

  • From<&str> for JsString was also fixed to correctly produce a Latin1 string for characters in the U+0080–U+00FF range, not just plain ASCII.

@linisha15 linisha15 requested a review from a team as a code owner March 6, 2026 11:30
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,902 49,666 -236
Ignored 2,222 2,284 +62
Failed 839 1,013 +174
Panics 0 0 0
Conformance 94.22% 93.77% -0.45%
Fixed tests (2):
test/built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-upper-b.js (previously Failed)
test/built-ins/RegExp/regexp-modifiers/remove-ignoreCase-affects-slash-lower-b.js (previously Failed)
Broken tests (183):
test/intl402/default-locale-is-canonicalized.js (previously Passed)
test/intl402/fallback-locales-are-supported.js (previously Passed)
test/intl402/constructors-taint-Object-prototype.js (previously Passed)
test/intl402/constructors-taint-Object-prototype-2.js (previously Passed)
test/intl402/DateTimeFormat/test-option-localeMatcher.js (previously Passed)
test/intl402/DateTimeFormat/constructor-options-toobject.js (previously Passed)
test/intl402/DateTimeFormat/test-option-formatMatcher.js (previously Passed)
test/intl402/DateTimeFormat/numbering-system-calendar-options.js (previously Passed)
test/intl402/DateTimeFormat/constructor-options-timeStyle-valid.js (previously Passed)
test/intl402/DateTimeFormat/constructor-options-dateStyle-valid.js (previously Passed)
test/intl402/DateTimeFormat/taint-Object-prototype-date-time-components.js (previously Passed)
test/intl402/DateTimeFormat/constructor-default-value.js (previously Passed)
test/intl402/DateTimeFormat/taint-Object-prototype-dayPeriod.js (previously Passed)
test/intl402/DateTimeFormat/taint-Object-prototype-fractionalSecondDigits.js (previously Passed)
test/intl402/DateTimeFormat/casing-numbering-system-calendar-options.js (previously Passed)
test/intl402/DateTimeFormat/taint-Object-prototype.js (previously Passed)
test/intl402/DateTimeFormat/ignore-invalid-unicode-ext-values.js (previously Passed)
test/intl402/DateTimeFormat/prototype/formatToParts/temporal-zoneddatetime-not-supported.js (previously Passed)
test/intl402/DateTimeFormat/prototype/formatRangeToParts/temporal-zoneddatetime-not-supported.js (previously Passed)
test/intl402/DateTimeFormat/prototype/formatRange/temporal-zoneddatetime-not-supported.js (previously Passed)
test/intl402/DateTimeFormat/prototype/format/temporal-zoneddatetime-not-supported.js (previously Passed)
test/intl402/DateTimeFormat/prototype/resolvedOptions/length.js (previously Passed)
test/intl402/DateTimeFormat/prototype/resolvedOptions/builtin.js (previously Passed)
test/intl402/DateTimeFormat/prototype/resolvedOptions/name.js (previously Passed)
test/intl402/DateTimeFormat/prototype/resolvedOptions/resolved-hour-cycle-unicode-extensions-and-options.js (previously Passed)
test/intl402/DateTimeFormat/prototype/resolvedOptions/prop-desc.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lisu.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Garay.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Extender.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Changes_When_Casemapped.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/XID_Continue.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tangut.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kaithi.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bengali.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Tai_Yo.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Beria_Erfe.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Uppercase.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Cyrillic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Lowercase.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Elbasan.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kawi.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Latin.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Permic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Khitan_Small_Script.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Case_Ignorable.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Avestan.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Carian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Changes_When_Titlecased.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Meroitic_Hieroglyphs.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Letter.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mongolian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Common.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Kirat_Rai.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Sidetic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gunjala_Gondi.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Myanmar.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Grapheme_Extend.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tulu_Tigalari.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Extended_Pictographic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Cased_Letter.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Lowercase_Letter.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Latin.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gothic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tolong_Siki.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Gurung_Khema.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Kawi.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Balinese.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Bopomofo.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/ID_Start.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Thai.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Myanmar.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Georgian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Assigned.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Math.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Math_Symbol.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Glagolitic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Turkic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Emoji_Presentation.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Samaritan.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Todhri.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Nonspacing_Mark.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Changes_When_Uppercased.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Ideographic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Sunuwar.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Cased.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Changes_When_Casefolded.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tibetan.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Dash_Punctuation.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cherokee.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ethiopic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Beria_Erfe.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Changes_When_Lowercased.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Letter_Number.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Telugu.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Greek.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Adlam.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mahajani.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Egyptian_Hieroglyphs.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ol_Onal.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lycian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Tolong_Siki.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sharada.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Emoji.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tifinagh.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Garay.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lydian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Phags_Pa.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Number.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Egyptian_Hieroglyphs.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Shavian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Telugu.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/ID_Continue.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Runic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Yo.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Newa.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kirat_Rai.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Han.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Bidi_Mirrored.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Punctuation.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Arabic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Dash.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kannada.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Ol_Onal.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Coptic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Kannada.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Todhri.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nandinagari.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Alphabetic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cyrillic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sunuwar.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syriac.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Diacritic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Osage.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Gurung_Khema.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tirhuta.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Tangut.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Old_Hungarian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Tulu_Tigalari.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Sharada.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Terminal_Punctuation.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khitan_Small_Script.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Grapheme_Base.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Toto.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Armenian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tai_Le.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Devanagari.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Uppercase_Letter.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Arabic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/XID_Start.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Duployan.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Spacing_Mark.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Sidetic.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hebrew.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Caucasian_Albanian.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Balinese.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/General_Category_-_Currency_Symbol.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji.js (previously Passed)
test/built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence.js (previously Passed)
test/built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-upper-w.js (previously Passed)
test/built-ins/RegExp/regexp-modifiers/add-ignoreCase-affects-slash-lower-w.js (previously Passed)
test/built-ins/Object/freeze/typedarray-backed-by-resizable-buffer.js (previously Passed)
test/staging/sm/RegExp/unicode-ignoreCase.js (previously Passed)
test/staging/sm/RegExp/unicode-ignoreCase-word-boundary.js (previously Passed)

Tested main commit: cf48c75d45aeaece9ada406250030e28184b1acd
Tested PR commit: dfc2153d027fb60866b5310b870d8e47e3f60379
Compare commits: cf48c75...dfc2153

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.51%. Comparing base (6ddc2b4) to head (dfc2153).
⚠️ Report is 832 commits behind head on main.

Files with missing lines Patch % Lines
core/ast/src/lib.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4896       +/-   ##
===========================================
+ Coverage   47.24%   58.51%   +11.27%     
===========================================
  Files         476      559       +83     
  Lines       46892    61473    +14581     
===========================================
+ Hits        22154    35972    +13818     
- Misses      24738    25501      +763     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rajat552
Copy link

rajat552 commented Mar 6, 2026

Hi @linisha15 ,

Thanks for working on this! I was also exploring this issue since I opened it.

I noticed that the formatting and lint checks are currently failing. You may want to run cargo fmt and cargo clippy to fix them before review.

Looking forward to the updated changes.

@rajat552
Copy link

rajat552 commented Mar 6, 2026

please fix CI first

@linisha15
Copy link
Contributor Author

@rajat552 Thanks for the feedback! I clicked “Update branch” to sync with the latest main. It looks like the CI workflows are now waiting for maintainer approval before they run again. Once they are approved, the checks should start automatically.

Copy link

@rajat552 rajat552 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix CI first

@linisha15
Copy link
Contributor Author

Hi @rajat552, thanks for the feedback . CI has been fixed , the formatting and lint issues are resolved in the latest commit.

@linisha15
Copy link
Contributor Author

Hi! It looks like the CI workflows are currently awaiting maintainer approval before they can run. Once they are approved, the checks should start automatically. Please let me know if anything else is needed from my side. Thanks!

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice optimization!

@jedel1043 jedel1043 added this pull request to the merge queue Mar 13, 2026
Merged via the queue into boa-dev:main with commit 752311a Mar 13, 2026
19 checks passed
@linisha15 linisha15 deleted the perf/latin1-detection-at-intern-time-4881 branch March 13, 2026 16:47
MayankRaj435 pushed a commit to MayankRaj435/boa that referenced this pull request Mar 17, 2026
boa-dev#4896)

This Pull Request
closes boa-dev#4881

Background-

When the bytecode compiler converts an interned string (`Sym`) to a
`JsString`, it needs to decide whether to store it as Latin1 (1 byte per
character) or UTF-16 (2 bytes per character). Previously, this was done
by scanning every character of the string on each call — even if the
same string was used many times.

What changed-

- The `Interner` now checks once, at the moment a string is first
stored, whether all its characters fit in Latin1 (code point ≤ U+00FF).
The result is saved in a new `latin1_flags` field.

- A new `is_latin1(sym)` method lets callers read that saved result
instantly, without re-scanning the string.

- `ToJsString for Sym` in both `boa_ast` and `boa_engine::bytecompiler`
now calls `is_latin1()` instead of scanning the string's characters
every time.

- `From<&str> for JsString` was also fixed to correctly produce a Latin1
string for characters in the U+0080–U+00FF range, not just plain ASCII.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

# Optimize string handling by detecting Latin1-encodable strings during parsing

4 participants