Skip to content

Added CLEAN_JS and MINI_JS benches - #581

Merged
Lan2u merged 5 commits into
boa-dev:masterfrom
neeldug:mini-benchmarks
Aug 20, 2020
Merged

Lan2u merged 5 commits into
boa-dev:masterfrom
neeldug:mini-benchmarks

Conversation

@neeldug

@neeldug neeldug commented Jul 20, 2020

Copy link
Copy Markdown
Contributor

These benches are arbitrary code which is subject to change,
functionally the programs are identical.

This Pull Request fixes/closes #564 .

It changes the following:

  • Exec and Full benchmarks to run with minified and clean code for comparison.

Specifically went for slightly longer function for visible change when minifying code with whitespace and character savings.

These benches are arbitrary code which is subject to change,
functionally the programs are identical.
@codecov

codecov Bot commented Jul 20, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #581 into master will increase coverage by 1.30%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #581      +/-   ##
==========================================
+ Coverage   71.25%   72.56%   +1.30%     
==========================================
  Files         176      179       +3     
  Lines       11557    13259    +1702     
==========================================
+ Hits         8235     9621    +1386     
- Misses       3322     3638     +316     
Impacted Files Coverage Δ
boa/src/builtins/object/internal_state.rs 0.00% <0.00%> (-41.67%) ⬇️
boa/src/builtins/value/rcstring.rs 69.23% <0.00%> (-7.70%) ⬇️
boa/src/builtins/number/mod.rs 62.28% <0.00%> (-6.16%) ⬇️
boa/src/builtins/error/mod.rs 32.00% <0.00%> (-4.37%) ⬇️
boa/src/builtins/object/mod.rs 38.11% <0.00%> (-4.16%) ⬇️
boa/src/builtins/value/conversions.rs 49.27% <0.00%> (-4.06%) ⬇️
boa/src/builtins/value/mod.rs 65.51% <0.00%> (-3.64%) ⬇️
boa/src/builtins/json/mod.rs 79.48% <0.00%> (-1.85%) ⬇️
boa/src/builtins/array/mod.rs 79.26% <0.00%> (-1.44%) ⬇️
boa/src/builtins/mod.rs 22.58% <0.00%> (-0.76%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13f7374...9f623b1. Read the comment docs.

@neeldug
neeldug marked this pull request as ready for review July 31, 2020 02:23

@HalidOdat HalidOdat left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this really go in exec? this to me seems like we are benchmarking the lexer/parser and not execution.

What do you think? @Razican @jasonwilliams

@Razican Razican added the C-Benchmark Issues and PRs related to the benchmark subsystem. label Aug 14, 2020
@Razican

Razican commented Aug 14, 2020 •

Copy link
Copy Markdown
Member

Should this really go in exec? this to me seems like we are benchmarking the lexer/parser and not execution.

If I'm not mistaken, the part inside of the bench() iterator is the execution (or the full thing), so they are in the correct place, but it would be very nice to add parsing benchmarks too.

@Razican Razican added the A-Enhancement New feature or request label Aug 14, 2020
@Razican Razican added this to the v0.10.0 milestone Aug 14, 2020
@neeldug

neeldug commented Aug 16, 2020

Copy link
Copy Markdown
Contributor Author

Should this really go in exec? this to me seems like we are benchmarking the lexer/parser and not execution.

If I'm not mistaken, the part inside of the bench() iterator is the execution (or the full thing), so they are in the correct place, but it would be very nice to add parsing benchmarks too.

I can implement this in the same PR, if this is wanted?

@Razican

Razican commented Aug 16, 2020

Copy link
Copy Markdown
Member

I can implement this in the same PR, if this is wanted?

Yes, please, if you can, that would be more complete :)

Added identical benchmark cases for parser.
@Razican Razican added the Blocked Waiting for another code change label Aug 19, 2020
@Razican

Razican commented Aug 19, 2020

Copy link
Copy Markdown
Member

I think this is blocked until #640 lands, since it will need a refactor.

@Lan2u

Lan2u commented Aug 19, 2020

Copy link
Copy Markdown

#640 is now merged so this is unblocked :)

@Lan2u Lan2u removed the Blocked Waiting for another code change label Aug 19, 2020

@Razican Razican left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is good from my side, but let's wait for #646 to land in order to not fail the tests.

@Lan2u
Lan2u merged commit 4009204 into boa-dev:master Aug 20, 2020
@neeldug
neeldug deleted the mini-benchmarks branch August 20, 2020 11:46
Lan2u pushed a commit that referenced this pull request Aug 22, 2020
* Added CLEAN_JS and MINI_JS benches (#581)

* Added CLEAN_JS and MINI_JS benches

These benches are arbitrary code which is subject to change,
functionally the programs are identical.

* Forgot semicolon

* Adding parsing benchmarks for CleanJS & MiniJS

Added identical benchmark cases for parser.

* Migrating Clean and Mini benchmarks to new format

Adding js scripts in bench_scripts & moving exec, full and parser
benchmarks to new include_str!() macro.

* Move `require_object_coercible` to `Value` (#654)

Co-authored-by: neeldug <[email protected]>
Co-authored-by: HalidOdat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Enhancement New feature or request C-Benchmark Issues and PRs related to the benchmark subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add benchmarks for "uglified" JS

5 participants