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

Fix internal object methods #600

Closed
wants to merge 13 commits into from
Closed

Conversation

@HalidOdat HalidOdat added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics labels Jul 31, 2020
@codecov
Copy link

codecov bot commented Jul 31, 2020

Codecov Report

Merging #600 into master will increase coverage by 0.12%.
The diff coverage is 47.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
+ Coverage   71.67%   71.79%   +0.12%     
==========================================
  Files         177      177              
  Lines       11647    11659      +12     
==========================================
+ Hits         8348     8371      +23     
+ Misses       3299     3288      -11     
Impacted Files Coverage Δ
boa/src/builtins/property/attribute/mod.rs 89.65% <ø> (-0.97%) ⬇️
boa/src/environment/global_environment_record.rs 27.95% <0.00%> (ø)
boa/src/builtins/property/mod.rs 40.77% <33.33%> (-0.98%) ⬇️
boa/src/builtins/object/internal_methods.rs 39.13% <41.40%> (+9.61%) ⬆️
boa/src/builtins/json/mod.rs 81.33% <100.00%> (ø)
boa/src/builtins/object/mod.rs 39.44% <100.00%> (+0.27%) ⬆️
boa/src/builtins/property/attribute/tests.rs 100.00% <100.00%> (ø)
boa/src/builtins/value/mod.rs 67.18% <100.00%> (+1.25%) ⬆️

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 8036a49...9730db2. Read the comment docs.

@github-actions
Copy link

Benchmark for 5ea2ff8

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 358.4±16.59ns 377.0±19.63ns -4.93%
Arithmetic operations (Full) 176.4±9.04µs 207.1±30.07µs -14.82%
Array access (Execution) 8.9±0.54µs 9.0±0.45µs -1.11%
Array access (Full) 195.5±10.40µs 198.2±9.66µs -1.36%
Array creation (Execution) 3.1±0.13ms 3.3±0.16ms -6.06%
Array creation (Full) 3.4±0.16ms 3.4±0.14ms 0.00%
Array pop (Execution) 1134.3±57.19µs 1130.8±66.99µs +0.31%
Array pop (Full) 1488.2±66.73µs 1444.3±75.51µs +3.04%
Boolean Object Access (Execution) 4.6±0.24µs 4.7±0.26µs -2.13%
Boolean Object Access (Full) 189.2±8.41µs 189.3±8.58µs -0.05%
Create Realm 435.4±23.62ns 428.7±25.32ns +1.56%
Dynamic Object Property Access (Execution) 5.5±0.34µs 5.5±0.35µs 0.00%
Dynamic Object Property Access (Full) 190.5±7.97µs 195.7±12.17µs -2.66%
Expression (Lexer) 2.3±0.18µs 2.4±0.27µs -4.17%
Expression (Parser) 5.1±0.28µs 5.3±0.31µs -3.77%
Fibonacci (Execution) 1031.5±49.53µs 1029.4±60.85µs +0.20%
Fibonacci (Full) 1272.6±47.64µs 1265.2±87.24µs +0.58%
For loop (Execution) 23.0±1.88µs 21.6±1.05µs +6.48%
For loop (Full) 208.6±11.69µs 207.0±10.47µs +0.77%
For loop (Lexer) 5.0±0.24µs 5.1±0.26µs -1.96%
For loop (Parser) 14.0±0.72µs 14.5±0.59µs -3.45%
Goal Symbols (Parser) 8.2±0.46µs 9.2±0.86µs -10.87%
Hello World (Lexer) 843.3±47.65ns 818.1±33.48ns +3.08%
Hello World (Parser) 2.1±0.12µs 2.1±0.11µs 0.00%
Long file (Parser) 6.3±0.23ms 6.7±0.76ms -5.97%
Number Object Access (Execution) 3.7±0.26µs 3.7±0.20µs 0.00%
Number Object Access (Full) 189.3±12.77µs 229.7±35.73µs -17.59%
Object Creation (Execution) 4.8±0.26µs 4.8±0.38µs 0.00%
Object Creation (Full) 209.0±12.18µs 214.9±23.48µs -2.75%
RegExp (Execution) 74.2±3.23µs 73.5±4.96µs +0.95%
RegExp (Full) 299.6±14.29µs 308.1±20.02µs -2.76%
RegExp Literal (Execution) 74.5±4.13µs 73.0±3.83µs +2.05%
RegExp Literal (Full) 275.6±15.65µs 273.9±13.54µs +0.62%
RegExp Literal Creation (Execution) 71.0±3.62µs 69.5±4.61µs +2.16%
RegExp Literal Creation (Full) 300.1±18.19µs 302.4±16.28µs -0.76%
Static Object Property Access (Execution) 4.9±0.26µs 5.0±0.29µs -2.00%
Static Object Property Access (Full) 192.8±10.47µs 196.3±15.42µs -1.78%
String Object Access (Execution) 6.9±0.40µs 7.1±0.81µs -2.82%
String Object Access (Full) 193.7±8.48µs 229.7±39.06µs -15.67%
String comparison (Execution) 6.6±0.37µs 6.6±0.33µs 0.00%
String comparison (Full) 191.4±9.08µs 248.5±26.99µs -22.98%
String concatenation (Execution) 5.2±0.30µs 5.4±0.44µs -3.70%
String concatenation (Full) 189.8±13.94µs 191.1±11.06µs -0.68%
String copy (Execution) 3.9±0.19µs 4.2±0.19µs -7.14%
String copy (Full) 187.9±8.58µs 188.9±8.77µs -0.53%
Symbols (Execution) 3.3±0.11µs 3.2±0.13µs +3.12%
Symbols (Full) 177.2±6.49µs 174.4±9.54µs +1.61%

This was linked to issues Jul 31, 2020
@HalidOdat HalidOdat force-pushed the fix/internal-object-methods branch from 5f7f9ac to a39c471 Compare August 2, 2020 01:44
@github-actions
Copy link

github-actions bot commented Aug 2, 2020

Benchmark for 275f4ab

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 369.7±7.43ns 370.2±9.58ns -0.14%
Arithmetic operations (Full) 168.4±5.19µs 164.9±4.57µs +2.12%
Array access (Execution) 8.2±0.28µs 8.1±0.18µs +1.23%
Array access (Full) 181.8±10.31µs 177.8±4.87µs +2.25%
Array creation (Execution) 3.3±0.08ms 3.3±0.08ms 0.00%
Array creation (Full) 3.6±0.06ms 3.7±0.12ms -2.70%
Array pop (Execution) 1189.8±56.37µs 1165.8±33.61µs +2.06%
Array pop (Full) 1477.3±47.72µs 1520.5±55.67µs -2.84%
Boolean Object Access (Execution) 4.2±0.13µs 4.2±0.19µs 0.00%
Boolean Object Access (Full) 178.9±6.13µs 174.0±7.39µs +2.82%
Create Realm 435.5±16.39ns 434.9±20.76ns +0.14%
Dynamic Object Property Access (Execution) 4.8±0.12µs 4.9±0.17µs -2.04%
Dynamic Object Property Access (Full) 174.6±16.30µs 173.6±5.20µs +0.58%
Expression (Lexer) 2.4±0.12µs 2.4±0.09µs 0.00%
Expression (Parser) 5.6±0.18µs 5.5±0.14µs +1.82%
Fibonacci (Execution) 863.3±16.06µs 864.1±18.06µs -0.09%
Fibonacci (Full) 1042.2±23.97µs 1070.5±102.15µs -2.64%
For loop (Execution) 21.7±0.57µs 21.6±0.59µs +0.46%
For loop (Full) 191.4±6.59µs 189.6±4.57µs +0.95%
For loop (Lexer) 5.4±0.19µs 5.3±0.10µs +1.89%
For loop (Parser) 14.5±0.79µs 14.2±0.76µs +2.11%
Goal Symbols (Parser) 8.7±0.41µs 8.5±0.28µs +2.35%
Hello World (Lexer) 841.1±19.32ns 828.4±19.91ns +1.53%
Hello World (Parser) 2.2±0.04µs 2.2±0.11µs 0.00%
Long file (Parser) 6.4±0.09ms 6.2±0.17ms +3.23%
Number Object Access (Execution) 3.3±0.12µs 3.3±0.08µs 0.00%
Number Object Access (Full) 175.0±4.39µs 170.7±5.64µs +2.52%
Object Creation (Execution) 4.1±0.16µs 4.3±0.42µs -4.65%
Object Creation (Full) 192.0±8.91µs 194.1±5.82µs -1.08%
RegExp (Execution) 67.9±1.79µs 68.3±2.32µs -0.59%
RegExp (Full) 278.9±7.13µs 285.4±8.22µs -2.28%
RegExp Literal (Execution) 68.1±2.30µs 67.6±2.05µs +0.74%
RegExp Literal (Full) 247.1±9.69µs 249.6±6.51µs -1.00%
RegExp Literal Creation (Execution) 66.1±4.00µs 64.8±2.45µs +2.01%
RegExp Literal Creation (Full) 280.8±8.86µs 282.1±10.10µs -0.46%
Static Object Property Access (Execution) 4.3±0.12µs 4.3±0.11µs 0.00%
Static Object Property Access (Full) 174.5±7.24µs 171.4±4.28µs +1.81%
String Object Access (Execution) 6.3±0.19µs 6.3±0.17µs 0.00%
String Object Access (Full) 179.3±5.01µs 178.3±4.16µs +0.56%
String comparison (Execution) 5.7±0.14µs 6.0±0.22µs -5.00%
String comparison (Full) 182.9±5.36µs 179.7±10.70µs +1.78%
String concatenation (Execution) 4.7±0.12µs 4.9±0.14µs -4.08%
String concatenation (Full) 173.6±4.60µs 170.1±3.77µs +2.06%
String copy (Execution) 3.3±0.13µs 3.5±0.09µs -5.71%
String copy (Full) 173.6±8.13µs 168.2±4.97µs +3.21%
Symbols (Execution) 2.9±0.11µs 2.9±0.12µs 0.00%
Symbols (Full) 158.3±4.70µs 159.5±4.97µs -0.75%

@github-actions
Copy link

github-actions bot commented Aug 2, 2020

Benchmark for 262d32d

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 320.0±18.53ns 319.4±19.99ns +0.19%
Arithmetic operations (Full) 138.7±8.22µs 138.9±7.46µs -0.14%
Array access (Execution) 7.6±0.47µs 7.0±0.38µs +8.57%
Array access (Full) 157.3±11.42µs 155.2±9.96µs +1.35%
Array creation (Execution) 2.8±0.12ms 2.9±0.15ms -3.45%
Array creation (Full) 3.2±0.18ms 3.1±0.17ms +3.23%
Array pop (Execution) 1066.8±66.03µs 1014.8±70.50µs +5.12%
Array pop (Full) 1310.5±76.95µs 1311.9±77.50µs -0.11%
Boolean Object Access (Execution) 3.9±0.21µs 3.7±0.22µs +5.41%
Boolean Object Access (Full) 147.7±7.09µs 146.6±8.76µs +0.75%
Create Realm 382.2±30.86ns 372.6±19.73ns +2.58%
Dynamic Object Property Access (Execution) 4.3±0.23µs 4.1±0.30µs +4.88%
Dynamic Object Property Access (Full) 146.8±8.48µs 148.6±8.08µs -1.21%
Expression (Lexer) 2.1±0.12µs 2.1±0.13µs 0.00%
Expression (Parser) 4.8±0.28µs 4.7±0.30µs +2.13%
Fibonacci (Execution) 754.7±48.36µs 745.1±41.99µs +1.29%
Fibonacci (Full) 903.8±43.12µs 942.7±41.61µs -4.13%
For loop (Execution) 18.4±1.17µs 19.0±1.12µs -3.16%
For loop (Full) 165.4±9.06µs 164.4±10.80µs +0.61%
For loop (Lexer) 4.5±0.35µs 4.5±0.24µs 0.00%
For loop (Parser) 12.0±0.65µs 12.4±1.05µs -3.23%
Goal Symbols (Parser) 7.2±0.39µs 7.3±0.38µs -1.37%
Hello World (Lexer) 699.6±41.50ns 711.4±54.12ns -1.66%
Hello World (Parser) 1838.7±110.70ns 1939.1±256.04ns -5.18%
Long file (Parser) 5.5±0.30ms 5.4±0.22ms +1.85%
Number Object Access (Execution) 3.1±0.17µs 2.8±0.17µs +10.71%
Number Object Access (Full) 147.7±7.06µs 144.9±7.65µs +1.93%
Object Creation (Execution) 3.7±0.25µs 3.5±0.19µs +5.71%
Object Creation (Full) 165.6±10.06µs 163.4±9.88µs +1.35%
RegExp (Execution) 59.9±3.11µs 59.4±3.10µs +0.84%
RegExp (Full) 238.0±17.26µs 241.3±13.62µs -1.37%
RegExp Literal (Execution) 60.2±8.45µs 57.8±3.14µs +4.15%
RegExp Literal (Full) 212.7±11.75µs 209.6±11.01µs +1.48%
RegExp Literal Creation (Execution) 55.8±2.84µs 55.1±3.38µs +1.27%
RegExp Literal Creation (Full) 239.3±14.15µs 242.0±14.59µs -1.12%
Static Object Property Access (Execution) 3.9±0.26µs 3.8±0.22µs +2.63%
Static Object Property Access (Full) 145.8±9.09µs 147.4±9.02µs -1.09%
String Object Access (Execution) 5.7±0.38µs 5.5±0.38µs +3.64%
String Object Access (Full) 147.4±7.39µs 151.7±10.45µs -2.83%
String comparison (Execution) 5.3±0.36µs 4.8±0.25µs +10.42%
String comparison (Full) 150.1±8.33µs 155.1±12.01µs -3.22%
String concatenation (Execution) 4.0±0.24µs 4.0±0.27µs 0.00%
String concatenation (Full) 144.4±7.62µs 146.5±8.63µs -1.43%
String copy (Execution) 3.1±0.19µs 2.9±0.16µs +6.90%
String copy (Full) 141.8±7.96µs 146.6±8.28µs -3.27%
Symbols (Execution) 2.5±0.18µs 2.5±0.17µs 0.00%
Symbols (Full) 137.5±9.26µs 136.3±10.42µs +0.88%

@github-actions
Copy link

github-actions bot commented Aug 2, 2020

Benchmark for 1afaf35

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 326.2±30.33ns 295.8±12.97ns +10.28%
Arithmetic operations (Full) 144.8±10.46µs 142.7±7.51µs +1.47%
Array access (Execution) 7.3±0.49µs 7.1±0.55µs +2.82%
Array access (Full) 154.8±7.23µs 158.4±12.81µs -2.27%
Array creation (Execution) 2.7±0.14ms 2.6±0.14ms +3.85%
Array creation (Full) 2.8±0.09ms 3.1±0.25ms -9.68%
Array pop (Execution) 974.8±50.43µs 893.6±31.28µs +9.09%
Array pop (Full) 1242.0±83.46µs 1207.5±92.68µs +2.86%
Boolean Object Access (Execution) 3.9±0.21µs 3.5±0.24µs +11.43%
Boolean Object Access (Full) 153.6±8.71µs 150.5±5.19µs +2.06%
Create Realm 362.2±18.78ns 349.3±21.31ns +3.69%
Dynamic Object Property Access (Execution) 4.3±0.21µs 4.3±0.26µs 0.00%
Dynamic Object Property Access (Full) 149.5±7.07µs 148.0±5.96µs +1.01%
Expression (Lexer) 1978.1±121.40ns 1919.3±112.25ns +3.06%
Expression (Parser) 4.3±0.18µs 4.3±0.27µs 0.00%
Fibonacci (Execution) 785.1±36.58µs 819.7±70.06µs -4.22%
Fibonacci (Full) 1069.1±59.78µs 946.6±46.78µs +12.94%
For loop (Execution) 18.1±0.90µs 18.8±1.57µs -3.72%
For loop (Full) 185.8±9.93µs 165.5±8.52µs +12.27%
For loop (Lexer) 4.2±0.22µs 4.2±0.19µs 0.00%
For loop (Parser) 11.7±0.75µs 11.4±0.58µs +2.63%
Goal Symbols (Parser) 6.7±0.30µs 8.1±0.66µs -17.28%
Hello World (Lexer) 703.6±34.43ns 705.5±64.75ns -0.27%
Hello World (Parser) 1738.3±109.21ns 1803.7±148.11ns -3.63%
Long file (Parser) 5.3±0.23ms 5.4±0.37ms -1.85%
Number Object Access (Execution) 3.4±0.21µs 2.7±0.17µs +25.93%
Number Object Access (Full) 148.2±12.01µs 147.2±7.26µs +0.68%
Object Creation (Execution) 3.7±0.19µs 3.6±0.21µs +2.78%
Object Creation (Full) 169.0±8.78µs 169.9±11.03µs -0.53%
RegExp (Execution) 59.1±2.51µs 62.0±3.20µs -4.68%
RegExp (Full) 245.7±11.34µs 244.0±12.79µs +0.70%
RegExp Literal (Execution) 59.1±2.64µs 61.6±4.86µs -4.06%
RegExp Literal (Full) 211.7±9.30µs 211.8±11.18µs -0.05%
RegExp Literal Creation (Execution) 58.2±4.08µs 60.0±3.52µs -3.00%
RegExp Literal Creation (Full) 237.2±11.49µs 241.9±13.51µs -1.94%
Static Object Property Access (Execution) 3.9±0.27µs 3.8±0.26µs +2.63%
Static Object Property Access (Full) 150.6±8.53µs 148.9±6.79µs +1.14%
String Object Access (Execution) 5.6±0.25µs 5.3±0.39µs +5.66%
String Object Access (Full) 175.2±8.38µs 149.9±8.31µs +16.88%
String comparison (Execution) 5.1±0.24µs 4.9±0.25µs +4.08%
String comparison (Full) 153.3±10.11µs 150.8±6.58µs +1.66%
String concatenation (Execution) 4.3±0.20µs 4.0±0.21µs +7.50%
String concatenation (Full) 146.0±7.28µs 145.0±8.26µs +0.69%
String copy (Execution) 3.2±0.20µs 3.0±0.16µs +6.67%
String copy (Full) 149.3±10.54µs 141.7±9.22µs +5.36%
Symbols (Execution) 2.5±0.15µs 2.4±0.11µs +4.17%
Symbols (Full) 159.6±11.59µs 135.9±6.50µs +17.44%

@HalidOdat
Copy link
Member Author

I think I'll start working on this again.

@HalidOdat HalidOdat added execution Issues or PRs related to code execution blocked Waiting for another code change labels Oct 4, 2020
@HalidOdat
Copy link
Member Author

Closing this since it has too many conflict to be salvageable, and most of the stuff has already been implemented in other PRs like #602

@HalidOdat HalidOdat closed this Jul 22, 2021
@HalidOdat HalidOdat deleted the fix/internal-object-methods branch July 22, 2021 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting for another code change bug Something isn't working builtins PRs and Issues related to builtins/intrinsics execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indexing strings Fix Internal Object Methods Setting array length does not delete elements.
1 participant