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

Remove arguments_binding field from CodeBlock #2969

Merged
merged 2 commits into from
May 29, 2023
Merged

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented May 28, 2023

This PR reorders a spec step to ensure that the "arguments" binding is always in the 0 position. This allows us to remove the arguments_binding field completely since we know in which environment it is (last pushed) and what index it has (0).

Removes 24 bytes from CodeBlock (from 184 bytes to 160 bytes)

@HalidOdat HalidOdat added performance Performance related changes and issues execution Issues or PRs related to code execution labels May 28, 2023
@HalidOdat HalidOdat added this to the v0.17.0 milestone May 28, 2023
@HalidOdat HalidOdat requested a review from a team May 28, 2023 19:12
@HalidOdat HalidOdat force-pushed the remove-argument-bindings branch from cfa3695 to 6eea363 Compare May 28, 2023 19:22
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 93,990 93,990 0
Passed 74,620 74,620 0
Ignored 17,622 17,622 0
Failed 1,748 1,748 0
Panics 0 0 0
Conformance 79.39% 79.39% 0.00%

@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Merging #2969 (cfa3695) into main (67c5652) will increase coverage by 0.01%.
The diff coverage is 97.82%.

❗ Current head cfa3695 differs from pull request most recent head 6eea363. Consider uploading reports for the commit 6eea363 to get more accurate results

@@            Coverage Diff             @@
##             main    #2969      +/-   ##
==========================================
+ Coverage   50.01%   50.03%   +0.01%     
==========================================
  Files         446      446              
  Lines       45906    45925      +19     
==========================================
+ Hits        22961    22979      +18     
- Misses      22945    22946       +1     
Impacted Files Coverage Δ
boa_engine/src/bytecompiler/mod.rs 65.93% <ø> (-0.05%) ⬇️
boa_engine/src/vm/code_block.rs 55.83% <95.65%> (+0.75%) ⬆️
boa_engine/src/builtins/function/arguments.rs 96.72% <100.00%> (+0.05%) ⬆️
boa_engine/src/bytecompiler/declarations.rs 55.88% <100.00%> (+0.43%) ⬆️

@HalidOdat
Copy link
Member Author

Main:

Richards: 20.5
DeltaBlue: 24.7
RayTrace: 82.0
----
Score (version 7): 34.6

PR:

Richards: 20.7
DeltaBlue: 25.0
RayTrace: 82.8
----
Score (version 7): 35.0
undefined

There is an improvement in performance :)

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

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

Nice work!

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.

Looks good!

@jedel1043 jedel1043 added this pull request to the merge queue May 29, 2023
Merged via the queue into main with commit f1bab1e May 29, 2023
@HalidOdat HalidOdat deleted the remove-argument-bindings branch May 29, 2023 17:25
@Razican
Copy link
Member

Razican commented Jun 2, 2023

Main:

Richards: 20.5
DeltaBlue: 24.7
RayTrace: 82.0
----
Score (version 7): 34.6

PR:

Richards: 20.7
DeltaBlue: 25.0
RayTrace: 82.8
----
Score (version 7): 35.0
undefined

There is an improvement in performance :)

What benchmarking technique are you using here? Could we document it so that we can at some point run it in the CI or manually?

@HalidOdat
Copy link
Member Author

What benchmarking technique are you using here?

I used the benchmark in this comment #1924 (comment) it is a subset of the quickjs benchmarks (for the full benchmarks see #1924 (comment)), I didn't use the full one because one has a very long execution time ~15min

To run the benchmarks with the boa cli with the file. (cargo run --bin boa --release -- bench.js).

Could we document it so that we can at some point run it in the CI

I don't know if the results would be that useful, at least while running with the github job runners...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution Issues or PRs related to code execution performance Performance related changes and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants