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] - Refactor RegExp constructor methods #2049

Closed
wants to merge 1 commit into from

Conversation

raskad
Copy link
Member

@raskad raskad commented May 1, 2022

This Pull Request changes the following:

  • Refactor RegExp constructor methods to match the spec and be more efficient

@raskad raskad added builtins PRs and Issues related to builtins/intrinsics Internal Category for changelog labels May 1, 2022
@raskad raskad added this to the v0.15.0 milestone May 1, 2022
@github-actions
Copy link

github-actions bot commented May 1, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 89,590 89,590 0
Passed 53,460 53,468 +8
Ignored 22,725 22,725 0
Failed 13,405 13,397 -8
Panics 0 0 0
Conformance 59.67% 59.68% +0.01%
Fixed tests (8):
test/language/literals/regexp/lastIndex.js [strict mode] (previously Failed)
test/language/literals/regexp/lastIndex.js (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptors/order-after-define-property.js [strict mode] (previously Failed)
test/built-ins/Object/getOwnPropertyDescriptors/order-after-define-property.js (previously Failed)
test/built-ins/Proxy/getOwnPropertyDescriptor/trap-is-undefined-target-is-proxy.js [strict mode] (previously Failed)
test/built-ins/Proxy/getOwnPropertyDescriptor/trap-is-undefined-target-is-proxy.js (previously Failed)
test/built-ins/RegExp/lastIndex.js [strict mode] (previously Failed)
test/built-ins/RegExp/lastIndex.js (previously Failed)

@codecov
Copy link

codecov bot commented May 1, 2022

Codecov Report

Merging #2049 (f40e453) into main (20f72d1) will increase coverage by 0.00%.
The diff coverage is 87.50%.

@@           Coverage Diff           @@
##             main    #2049   +/-   ##
=======================================
  Coverage   44.16%   44.17%           
=======================================
  Files         212      212           
  Lines       18812    18815    +3     
=======================================
+ Hits         8309     8312    +3     
  Misses      10503    10503           
Impacted Files Coverage Δ
boa_engine/src/builtins/string/mod.rs 63.48% <33.33%> (ø)
boa_engine/src/builtins/regexp/mod.rs 67.94% <100.00%> (+0.24%) ⬆️

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 20f72d1...f40e453. Read the comment docs.

@github-actions
Copy link

github-actions bot commented May 1, 2022

Benchmark for 78a5d16

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 514.4±2.11ns 520.9±1.18ns +1.26%
Arithmetic operations (Execution) 623.3±0.96ns 536.3±0.65ns -13.96%
Arithmetic operations (Parser) 5.9±0.01µs 5.9±0.01µs 0.00%
Array access (Compiler) 1256.2±3.23ns 1268.8±3.15ns +1.00%
Array access (Execution) 7.7±0.02µs 7.7±0.02µs 0.00%
Array access (Parser) 11.2±0.01µs 12.7±0.01µs +13.39%
Array creation (Compiler) 1774.1±5.51ns 1811.2±10.38ns +2.09%
Array creation (Execution) 2.6±0.00ms 2.6±0.00ms 0.00%
Array creation (Parser) 12.8±0.02µs 14.3±0.02µs +11.72%
Array pop (Compiler) 3.7±0.01µs 3.7±0.01µs 0.00%
Array pop (Execution) 1141.2±6.91µs 1138.7±6.29µs -0.22%
Array pop (Parser) 131.8±0.19µs 146.7±0.27µs +11.31%
Boolean Object Access (Compiler) 1066.8±11.13ns 1064.0±1.93ns -0.26%
Boolean Object Access (Execution) 4.1±0.01µs 3.6±0.01µs -12.20%
Boolean Object Access (Parser) 13.3±0.04µs 15.0±0.04µs +12.78%
Clean js (Compiler) 3.4±0.01µs 3.3±0.01µs -2.94%
Clean js (Execution) 699.2±6.09µs 695.1±4.78µs -0.59%
Clean js (Parser) 31.2±0.03µs 31.3±0.04µs +0.32%
Create Realm 240.5±0.35ns 274.7±0.23ns +14.22%
Dynamic Object Property Access (Compiler) 1613.3±3.97ns 1610.9±3.49ns -0.15%
Dynamic Object Property Access (Execution) 5.4±0.02µs 5.3±0.04µs -1.85%
Dynamic Object Property Access (Parser) 9.9±0.02µs 11.1±0.02µs +12.12%
Fibonacci (Compiler) 2.3±0.01µs 2.3±0.01µs 0.00%
Fibonacci (Execution) 1308.0±1.02µs 1320.6±1.30µs +0.96%
Fibonacci (Parser) 15.1±0.10µs 17.1±0.02µs +13.25%
For loop (Compiler) 1936.9±5.07ns 1942.0±12.09ns +0.26%
For loop (Execution) 15.4±0.07µs 15.3±0.07µs -0.65%
For loop (Parser) 13.1±0.03µs 14.7±0.08µs +12.21%
Mini js (Compiler) 3.2±0.01µs 3.2±0.01µs 0.00%
Mini js (Execution) 662.9±3.87µs 660.4±3.99µs -0.38%
Mini js (Parser) 24.4±0.04µs 27.4±0.03µs +12.30%
Number Object Access (Compiler) 1015.0±2.27ns 1027.9±1.64ns +1.27%
Number Object Access (Execution) 3.2±0.01µs 3.2±0.01µs 0.00%
Number Object Access (Parser) 10.4±0.03µs 11.7±0.02µs +12.50%
Object Creation (Compiler) 1349.9±7.07ns 1375.8±14.42ns +1.92%
Object Creation (Execution) 5.1±0.02µs 5.1±0.01µs 0.00%
Object Creation (Parser) 8.6±0.02µs 9.7±0.02µs +12.79%
RegExp (Compiler) 1636.0±3.40ns 1607.0±3.98ns -1.77%
RegExp (Execution) 11.0±0.05µs 11.6±0.07µs +5.45%
RegExp (Parser) 9.5±0.03µs 10.7±0.02µs +12.63%
RegExp Creation (Compiler) 1381.0±7.29ns 1397.8±1.22ns +1.22%
RegExp Creation (Execution) 8.1±0.02µs 8.8±0.03µs +8.64%
RegExp Creation (Parser) 7.9±0.02µs 8.9±0.02µs +12.66%
RegExp Literal (Compiler) 1628.5±4.01ns 1619.0±9.17ns -0.58%
RegExp Literal (Execution) 11.0±0.04µs 11.6±0.06µs +5.45%
RegExp Literal (Parser) 7.7±0.01µs 8.7±0.03µs +12.99%
RegExp Literal Creation (Compiler) 1411.3±2.00ns 1401.8±2.38ns -0.67%
RegExp Literal Creation (Execution) 8.1±0.02µs 8.8±0.03µs +8.64%
RegExp Literal Creation (Parser) 6.0±0.01µs 6.8±0.01µs +13.33%
Static Object Property Access (Compiler) 1393.8±4.17ns 1409.3±1.89ns +1.11%
Static Object Property Access (Execution) 5.3±0.02µs 5.2±0.01µs -1.89%
Static Object Property Access (Parser) 9.2±0.02µs 10.3±0.01µs +11.96%
String Object Access (Compiler) 1437.4±8.95ns 1423.5±5.93ns -0.97%
String Object Access (Execution) 5.9±0.03µs 5.8±0.02µs -1.69%
String Object Access (Parser) 14.8±0.02µs 14.8±0.02µs 0.00%
String comparison (Compiler) 2.0±0.00µs 2.1±0.00µs +5.00%
String comparison (Execution) 4.6±0.01µs 4.5±0.01µs -2.17%
String comparison (Parser) 10.1±0.05µs 11.4±0.01µs +12.87%
String concatenation (Compiler) 1619.3±4.35ns 1649.5±3.05ns +1.87%
String concatenation (Execution) 4.4±0.01µs 4.3±0.01µs -2.27%
String concatenation (Parser) 7.0±0.01µs 7.9±0.01µs +12.86%
String copy (Compiler) 1270.9±3.30ns 1284.3±3.99ns +1.05%
String copy (Execution) 4.1±0.01µs 4.0±0.01µs -2.44%
String copy (Parser) 5.2±0.01µs 5.9±0.01µs +13.46%
Symbols (Compiler) 827.2±1.32ns 905.5±2.02ns +9.47%
Symbols (Execution) 4.2±0.02µs 4.2±0.02µs 0.00%
Symbols (Parser) 4.1±0.01µs 4.6±0.01µs +12.20%

Copy link
Contributor

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@HalidOdat HalidOdat 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 to me! :)

@HalidOdat
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request May 3, 2022
This Pull Request changes the following:

- Refactor `RegExp` constructor methods to match the spec and be more efficient
@bors
Copy link

bors bot commented May 3, 2022

This PR was included in a batch that was canceled, it will be automatically retried

bors bot pushed a commit that referenced this pull request May 3, 2022
This Pull Request changes the following:

- Refactor `RegExp` constructor methods to match the spec and be more efficient
@bors
Copy link

bors bot commented May 3, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Refactor RegExp constructor methods [Merged by Bors] - Refactor RegExp constructor methods May 3, 2022
@bors bors bot closed this May 3, 2022
@bors bors bot deleted the regexp-constructor-lastindex branch May 3, 2022 04:16
Razican pushed a commit that referenced this pull request Jun 8, 2022
This Pull Request changes the following:

- Refactor `RegExp` constructor methods to match the spec and be more efficient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics Internal Category for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants