Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use JS's == operator for JSString equality comparison #313

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

Merged
kateinoigakukun merged 3 commits into main from maxd/jsstring-elementsequal
Mar 27, 2025

Conversation

@MaxDesiatov
Copy link
Member

@MaxDesiatov MaxDesiatov commented Mar 25, 2025

This change reduces binary size of products linked with JavaScriptKit when used with Embedded Swift. By relying on reference equality and otherwise on element-wise equality it avoids going through string normalization that would add a dependency on other portions of the Swift standard library.

Copy link

github-actions bot commented Mar 25, 2025
edited
Loading

Time Change: +268ms (2%)

Total Time: 9,730ms

Test name Duration Change
Serialization/JavaScript function call from Swift 133ms +12ms (9%) 🔍
Serialization/Swift Int to JavaScript with assignment 366ms +23ms (6%) 🔍
Serialization/Swift Int to JavaScript with call 999ms +52ms (5%) 🔍
Serialization/Swift String to JavaScript with assignment 439ms +25ms (5%) 🔍
View Unchanged
Test name Duration Change
Serialization/JavaScript function call through Wasm import 24ms +0ms
Serialization/JavaScript function call through Wasm import with int 23ms -0ms
Serialization/JavaScript Number to Swift Int 269ms +8ms (2%)
Serialization/Swift String to JavaScript with call 1,078ms +43ms (3%)
Serialization/JavaScript String to Swift String 3,578ms +90ms (2%)
Object heap/Increment and decrement RC 2,791ms +18ms (0%)
View Baselines
Test name Duration
Serialization/Call JavaScript function directly 8ms
Serialization/Assign JavaScript number directly 6ms
Serialization/Call with JavaScript number directly 6ms
Serialization/Write JavaScript string directly 7ms
Serialization/Call with JavaScript string directly 5ms

@kateinoigakukun kateinoigakukun changed the title (削除) Use elementsEqual in JSString: Equatable conformance (削除ここまで) (追記) Use JS's == operator for JSString equality comparison (追記ここまで) Mar 27, 2025
@kateinoigakukun kateinoigakukun merged commit fe6d2e5 into main Mar 27, 2025
6 checks passed
@kateinoigakukun kateinoigakukun deleted the maxd/jsstring-elementsequal branch March 27, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kateinoigakukun kateinoigakukun kateinoigakukun approved these changes

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /