-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement latin1 encoded JsString
s
#3450
Conversation
89ca28e
to
4b344b9
Compare
Test262 conformance changes
|
2bcb954
to
b542069
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3450 +/- ##
==========================================
- Coverage 47.24% 44.47% -2.77%
==========================================
Files 476 490 +14
Lines 46892 50360 +3468
==========================================
+ Hits 22154 22398 +244
- Misses 24738 27962 +3224 ☔ View full report in Codecov by Sentry. |
7829b91
to
c71731c
Compare
c71731c
to
52d192a
Compare
6b1a8b5
to
2873a3b
Compare
JsString
s
09305a7
to
cea4f38
Compare
This is ready for review/merge 🥳 In terms of performance it's pretty much the same as on main, a very slight regression that doesn't effect the overall score. I did some analysis on what is the percentage of latin1 and u16 through out the
There was also a reduction on binary size by Checked locally and there is not difference between main and this PR in conformance, it seems that data repo's test262 data is not being updated? |
That's weird. I checked the output of more recent PRs such as dependabot's and everything looks fine. |
I reran the test262 workflow and now it shows the correct conformance! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just got a few comments, otherwise looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really impressive work!
This fixes #3097
This memory optimization is implemented by both spidermonkey and v8.
This PR encodes strings that can be represented as latin1 as a byte array, instead of
u16
array, this cuts latin1 strings size by2x
.This may also have some interesting optimization that could be applied when we know that the string is in the ASCII range.Decided to not preserve asciiness though it can work with asciiness preserved it would complicate other string optimizations. AFIK v8 does not preserve the asciiness. Preserving the asciiness could lead to some interesting optimizations but at the cost of a lot of complexity which from my testing doesn't seem to be worth it.