Skip to content
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 by Bors] - Optimize Get/SetPropertyByName #2608

Closed
wants to merge 2 commits into from

Conversation

tunz
Copy link
Contributor

@tunz tunz commented Feb 18, 2023

Similar to #2604, GetPropertyByName/SetPropertyByName has only string property key. So, we can skip index and utf16 conversions.

This improves QuickJS benchmark score 5.8% on average.
Richards: 37.0 -> 41.2
DeltaBlue: 38.1 -> 41.4
Crypto: 59.6 -> 59.8
RayTrace: 146 -> 159
EarleyBoyer: 138 -> 142
Splay: 104 -> 106
NavierStokes: 10.2 -> 10.3

@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Merging #2608 (3d1b1c0) into main (310c671) will increase coverage by 0.19%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2608      +/-   ##
==========================================
+ Coverage   49.42%   49.61%   +0.19%     
==========================================
  Files         386      384       -2     
  Lines       39244    39082     -162     
==========================================
- Hits        19396    19391       -5     
+ Misses      19848    19691     -157     
Impacted Files Coverage Δ
boa_engine/src/value/mod.rs 65.64% <100.00%> (ø)
boa_engine/src/vm/opcode/get/property.rs 65.62% <100.00%> (ø)
boa_engine/src/vm/opcode/set/property.rs 64.34% <100.00%> (-0.28%) ⬇️
boa_interner/src/lib.rs 82.35% <0.00%> (-1.69%) ⬇️
boa_engine/src/string/mod.rs 80.96% <0.00%> (-0.14%) ⬇️
boa_examples/src/bin/jsarray.rs
boa_examples/src/bin/closures.rs
boa_examples/src/bin/modulehandler.rs
boa_examples/src/bin/jsset.rs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

Thanks! Also, I'm seeing that you do additional benchmarking on the engine for every one of your PRs. Would you be open to integrate that on our repo?

@raskad
Copy link
Member

raskad commented Feb 19, 2023

bors r+

bors bot pushed a commit that referenced this pull request Feb 19, 2023
Similar to #2604, `GetPropertyByName`/`SetPropertyByName` has only string property key. So, we can skip index and utf16 conversions.

This improves QuickJS benchmark score 5.8% on average.
Richards: 37.0 -> 41.2
DeltaBlue: 38.1 -> 41.4
Crypto: 59.6 -> 59.8
RayTrace: 146 -> 159
EarleyBoyer: 138 -> 142
Splay: 104 -> 106
NavierStokes: 10.2 -> 10.3
@bors
Copy link

bors bot commented Feb 19, 2023

Build failed:

@raskad
Copy link
Member

raskad commented Feb 19, 2023

bors retry

bors bot pushed a commit that referenced this pull request Feb 19, 2023
Similar to #2604, `GetPropertyByName`/`SetPropertyByName` has only string property key. So, we can skip index and utf16 conversions.

This improves QuickJS benchmark score 5.8% on average.
Richards: 37.0 -> 41.2
DeltaBlue: 38.1 -> 41.4
Crypto: 59.6 -> 59.8
RayTrace: 146 -> 159
EarleyBoyer: 138 -> 142
Splay: 104 -> 106
NavierStokes: 10.2 -> 10.3
@bors
Copy link

bors bot commented Feb 19, 2023

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Optimize Get/SetPropertyByName [Merged by Bors] - Optimize Get/SetPropertyByName Feb 19, 2023
@bors bors bot closed this Feb 19, 2023
@tunz
Copy link
Contributor Author

tunz commented Feb 19, 2023

Thanks! Also, I'm seeing that you do additional benchmarking on the engine for every one of your PRs. Would you be open to integrate that on our repo?

yeah, it would be nice to have the benchmark in CI, or regular run on any pipeline here. But, I'm not familiar with how the CI works here and how I can test it. I simply downloaded the benchmark and combined the tests by running make after removing RegExp test which was not working with boa at the time.

@tunz tunz deleted the tunz/get-property-by-name branch July 18, 2023 21:11
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.

3 participants