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

Feature Context #656

Merged
merged 1 commit into from
Sep 7, 2020
Merged

Feature Context #656

merged 1 commit into from
Sep 7, 2020

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Aug 22, 2020

This PR is related to #445

It changes the following:

  • Add Context
  • Changed function signature to take a &mut Context.
  • Added Context::eval() instead of forward_val, forward, exec.
  • Moved stuff that should be in Context like symbol_count to Context.

@codecov
Copy link

codecov bot commented Aug 22, 2020

Codecov Report

Merging #656 into master will decrease coverage by 0.69%.
The diff coverage is 85.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #656      +/-   ##
==========================================
- Coverage   72.48%   71.78%   -0.70%     
==========================================
  Files         198      198              
  Lines       14181    13852     -329     
==========================================
- Hits        10279     9944     -335     
- Misses       3902     3908       +6     
Impacted Files Coverage Δ
boa/examples/classes.rs 0.00% <0.00%> (ø)
boa/src/class.rs 0.00% <0.00%> (ø)
boa_cli/src/main.rs 33.33% <ø> (ø)
boa_wasm/src/lib.rs 0.00% <0.00%> (ø)
tester/src/exec.rs 0.00% <0.00%> (ø)
boa/src/builtins/console/mod.rs 29.37% <15.78%> (ø)
boa/src/builtins/boolean/mod.rs 36.66% <40.00%> (ø)
boa/src/builtins/error/mod.rs 32.00% <50.00%> (ø)
boa/src/exec/mod.rs 85.41% <50.00%> (+17.58%) ⬆️
boa/src/context.rs 61.84% <61.84%> (ø)
... and 64 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 a12ce82...c1961de. Read the comment docs.

@github-actions
Copy link

Benchmark for 37a978c

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 438.2±17.23ns 367.0±13.31ns +19.40%
Arithmetic operations (Full) 256.3±13.85µs 264.4±10.82µs -3.06%
Array access (Execution) 9.0±0.40µs 8.9±0.30µs +1.12%
Array access (Full) 283.9±11.96µs 282.8±9.00µs +0.39%
Array creation (Execution) 3.3±0.13ms 3.4±0.11ms -2.94%
Array creation (Full) 3.6±0.16ms 3.6±0.16ms 0.00%
Array pop (Execution) 1189.3±49.40µs 1185.3±33.82µs +0.34%
Array pop (Full) 1515.9±66.64µs 1626.1±80.41µs -6.78%
Boolean Object Access (Execution) 5.1±0.34µs 5.0±0.16µs +2.00%
Boolean Object Access (Full) 275.8±8.59µs 272.9±8.22µs +1.06%
Clean js (Execution) 748.1±17.29µs 768.9±37.03µs -2.71%
Clean js (Full) 1064.4±56.29µs 1060.3±44.58µs +0.39%
Clean js (Parser) 26.4±1.10µs 26.0±0.77µs +1.54%
Create Realm 525.8±12.30ns 493.6±21.00ns +6.52%
Dynamic Object Property Access (Execution) 6.0±0.20µs 5.9±0.15µs +1.69%
Dynamic Object Property Access (Full) 284.6±12.89µs 287.1±16.26µs -0.87%
Expression (Lexer) 2.5±0.09µs 2.5±0.11µs 0.00%
Expression (Parser) 5.4±0.25µs 5.9±0.32µs -8.47%
Fibonacci (Execution) 950.0±30.99µs 955.4±25.93µs -0.57%
Fibonacci (Full) 1256.6±51.88µs 1232.2±36.10µs +1.98%
For loop (Execution) 25.0±0.89µs 24.7±0.65µs +1.21%
For loop (Full) 296.9±22.88µs 293.8±10.82µs +1.06%
For loop (Lexer) 4.2±0.19µs 4.4±0.13µs -4.55%
For loop (Parser) 13.2±0.81µs 13.3±0.60µs -0.75%
Goal Symbols (Parser) 9.1±0.51µs 8.8±0.38µs +3.41%
Hello World (Lexer) 905.3±31.28ns 908.2±41.02ns -0.32%
Hello World (Parser) 2.3±0.09µs 2.3±0.06µs 0.00%
Long file (Parser) 6.6±0.14ms 6.9±0.28ms -4.35%
Mini js (Execution) 694.5±22.16µs 682.5±22.21µs +1.76%
Mini js (Full) 1012.7±46.03µs 987.1±26.20µs +2.59%
Mini js (Parser) 24.1±0.93µs 23.7±0.76µs +1.69%
Number Object Access (Execution) 4.0±0.16µs 3.9±0.08µs +2.56%
Number Object Access (Full) 276.9±8.96µs 279.1±12.26µs -0.79%
Object Creation (Execution) 5.1±0.16µs 5.1±0.15µs 0.00%
Object Creation (Full) 324.6±10.51µs 334.6±17.05µs -2.99%
RegExp (Execution) 73.7±3.23µs 72.8±2.67µs +1.24%
RegExp (Full) 441.1±24.53µs 448.5±15.81µs -1.65%
RegExp Literal (Execution) 78.0±4.55µs 76.2±5.17µs +2.36%
RegExp Literal (Full) 372.2±28.24µs 366.0±8.58µs +1.69%
RegExp Literal Creation (Execution) 75.6±4.36µs 71.2±2.79µs +6.18%
RegExp Literal Creation (Full) 436.0±17.79µs 444.8±17.15µs -1.98%
Static Object Property Access (Execution) 5.4±0.19µs 5.6±0.48µs -3.57%
Static Object Property Access (Full) 287.1±15.81µs 291.5±18.95µs -1.51%
String Object Access (Execution) 7.3±0.30µs 7.2±0.25µs +1.39%
String Object Access (Full) 278.9±13.35µs 284.6±9.34µs -2.00%
String comparison (Execution) 6.8±0.20µs 6.9±0.20µs -1.45%
String comparison (Full) 278.5±9.32µs 275.5±8.49µs +1.09%
String concatenation (Execution) 5.4±0.20µs 5.5±0.23µs -1.82%
String concatenation (Full) 267.5±12.10µs 281.2±12.45µs -4.87%
String copy (Execution) 4.3±0.16µs 4.3±0.17µs 0.00%
String copy (Full) 268.2±9.65µs 269.5±11.64µs -0.48%
Symbols (Execution) 3.6±0.11µs 3.5±0.12µs +2.86%
Symbols (Full) 242.6±9.03µs 247.1±7.46µs -1.82%

@github-actions
Copy link

Benchmark for 131ba21

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 376.9±11.79ns 442.8±10.53ns -14.88%
Arithmetic operations (Full) 262.3±12.86µs 274.4±6.84µs -4.41%
Array access (Execution) 8.6±0.25µs 9.2±0.76µs -6.52%
Array access (Full) 288.0±7.81µs 299.1±7.71µs -3.71%
Array creation (Execution) 3.2±0.10ms 3.4±0.08ms -5.88%
Array creation (Full) 3.8±0.09ms 3.8±0.08ms 0.00%
Array pop (Execution) 1147.3±53.08µs 1181.2±33.48µs -2.87%
Array pop (Full) 1617.5±37.38µs 1550.5±41.83µs +4.32%
Boolean Object Access (Execution) 5.3±0.20µs 5.2±0.21µs +1.92%
Boolean Object Access (Full) 274.5±7.72µs 284.3±6.28µs -3.45%
Clean js (Execution) 763.0±23.95µs 777.5±21.12µs -1.86%
Clean js (Full) 1051.7±27.10µs 1096.7±43.55µs -4.10%
Clean js (Parser) 26.7±0.97µs 26.9±1.67µs -0.74%
Create Realm 481.4±14.70ns 484.4±13.95ns -0.62%
Dynamic Object Property Access (Execution) 5.9±0.21µs 6.1±0.19µs -3.28%
Dynamic Object Property Access (Full) 287.9±13.48µs 277.5±7.89µs +3.75%
Expression (Lexer) 2.4±0.07µs 2.5±0.06µs -4.00%
Expression (Parser) 5.4±0.21µs 5.5±0.16µs -1.82%
Fibonacci (Execution) 935.0±21.63µs 957.5±24.51µs -2.35%
Fibonacci (Full) 1238.8±30.23µs 1272.7±25.73µs -2.66%
For loop (Execution) 24.7±0.91µs 24.4±0.71µs +1.23%
For loop (Full) 303.3±14.69µs 311.5±12.19µs -2.63%
For loop (Lexer) 4.2±0.15µs 4.3±0.12µs -2.33%
For loop (Parser) 12.5±0.41µs 13.3±0.36µs -6.02%
Goal Symbols (Parser) 8.9±0.38µs 9.0±0.18µs -1.11%
Hello World (Lexer) 882.4±36.09ns 894.6±29.78ns -1.36%
Hello World (Parser) 2.2±0.12µs 2.3±0.06µs -4.35%
Long file (Parser) 6.5±0.16ms 6.9±0.11ms -5.80%
Mini js (Execution) 708.2±50.15µs 708.6±26.05µs -0.06%
Mini js (Full) 988.1±30.78µs 992.5±32.48µs -0.44%
Mini js (Parser) 22.6±1.02µs 23.9±0.54µs -5.44%
Number Object Access (Execution) 4.0±0.30µs 4.1±0.08µs -2.44%
Number Object Access (Full) 273.8±10.57µs 285.6±8.31µs -4.13%
Object Creation (Execution) 5.1±0.22µs 5.2±0.20µs -1.92%
Object Creation (Full) 344.6±16.07µs 326.1±7.86µs +5.67%
RegExp (Execution) 74.6±5.79µs 73.8±2.88µs +1.08%
RegExp (Full) 440.5±12.94µs 445.9±10.93µs -1.21%
RegExp Literal (Execution) 76.5±2.39µs 78.1±2.93µs -2.05%
RegExp Literal (Full) 376.6±20.61µs 361.9±14.25µs +4.06%
RegExp Literal Creation (Execution) 71.8±2.45µs 74.0±3.02µs -2.97%
RegExp Literal Creation (Full) 437.9±11.95µs 445.0±13.53µs -1.60%
Static Object Property Access (Execution) 5.4±0.35µs 5.4±0.15µs 0.00%
Static Object Property Access (Full) 292.3±8.74µs 275.8±6.83µs +5.98%
String Object Access (Execution) 7.5±0.30µs 7.5±0.17µs 0.00%
String Object Access (Full) 274.6±8.96µs 290.8±7.66µs -5.57%
String comparison (Execution) 7.1±0.28µs 7.0±0.22µs +1.43%
String comparison (Full) 276.3±10.28µs 282.9±7.68µs -2.33%
String concatenation (Execution) 5.5±0.30µs 5.8±0.36µs -5.17%
String concatenation (Full) 269.6±8.99µs 277.0±7.94µs -2.67%
String copy (Execution) 4.3±0.36µs 4.4±0.10µs -2.27%
String copy (Full) 269.5±8.41µs 273.9±7.18µs -1.61%
Symbols (Execution) 3.5±0.31µs 3.6±0.08µs -2.78%
Symbols (Full) 257.1±7.78µs 256.6±8.06µs +0.19%

@github-actions
Copy link

Benchmark for 22c35e1

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 301.6±17.17ns 312.8±19.66ns -3.58%
Arithmetic operations (Full) 219.1±13.69µs 220.9±10.97µs -0.81%
Array access (Execution) 7.2±0.36µs 7.2±0.37µs 0.00%
Array access (Full) 239.0±17.69µs 240.9±13.25µs -0.79%
Array creation (Execution) 2.7±0.12ms 2.8±0.10ms -3.57%
Array creation (Full) 3.1±0.17ms 3.0±0.16ms +3.33%
Array pop (Execution) 951.1±57.17µs 984.6±54.40µs -3.40%
Array pop (Full) 1269.7±92.06µs 1293.1±58.60µs -1.81%
Boolean Object Access (Execution) 4.9±0.26µs 4.7±0.22µs +4.26%
Boolean Object Access (Full) 270.3±11.03µs 253.7±42.42µs +6.54%
Clean js (Execution) 629.7±39.16µs 628.5±35.65µs +0.19%
Clean js (Full) 878.8±54.37µs 876.7±42.70µs +0.24%
Clean js (Parser) 21.1±1.12µs 21.0±1.30µs +0.48%
Create Realm 414.1±28.18ns 398.9±20.67ns +3.81%
Dynamic Object Property Access (Execution) 4.8±0.29µs 5.0±0.22µs -4.00%
Dynamic Object Property Access (Full) 232.0±13.60µs 232.6±13.07µs -0.26%
Expression (Lexer) 2.0±0.13µs 2.1±0.16µs -4.76%
Expression (Parser) 5.2±0.52µs 4.5±0.30µs +15.56%
Fibonacci (Execution) 793.4±53.06µs 791.6±45.70µs +0.23%
Fibonacci (Full) 1080.5±88.95µs 1060.5±80.23µs +1.89%
For loop (Execution) 20.0±1.20µs 20.6±1.22µs -2.91%
For loop (Full) 245.6±15.67µs 250.5±11.78µs -1.96%
For loop (Lexer) 3.7±0.27µs 3.7±0.28µs 0.00%
For loop (Parser) 10.6±0.53µs 10.6±0.69µs 0.00%
Goal Symbols (Parser) 7.2±0.38µs 7.1±0.46µs +1.41%
Hello World (Lexer) 727.8±49.45ns 735.1±36.65ns -0.99%
Hello World (Parser) 1802.8±91.08ns 1842.0±107.36ns -2.13%
Long file (Parser) 5.6±0.25ms 5.5±0.21ms +1.82%
Mini js (Execution) 574.6±38.16µs 579.1±50.16µs -0.78%
Mini js (Full) 806.1±40.07µs 797.6±34.33µs +1.07%
Mini js (Parser) 18.8±1.36µs 19.0±1.48µs -1.05%
Number Object Access (Execution) 3.8±0.20µs 3.8±0.20µs 0.00%
Number Object Access (Full) 278.3±15.79µs 261.7±16.07µs +6.34%
Object Creation (Execution) 4.1±0.32µs 4.3±0.30µs -4.65%
Object Creation (Full) 282.4±17.60µs 281.6±18.38µs +0.28%
RegExp (Execution) 64.2±4.71µs 60.4±4.00µs +6.29%
RegExp (Full) 365.1±22.61µs 390.8±25.66µs -6.58%
RegExp Literal (Execution) 69.4±6.98µs 63.4±3.96µs +9.46%
RegExp Literal (Full) 303.1±20.81µs 328.6±20.10µs -7.76%
RegExp Literal Creation (Execution) 64.0±4.68µs 60.1±3.60µs +6.49%
RegExp Literal Creation (Full) 357.3±25.01µs 389.7±22.50µs -8.31%
Static Object Property Access (Execution) 4.4±0.32µs 4.4±0.22µs 0.00%
Static Object Property Access (Full) 229.0±11.45µs 230.8±15.39µs -0.78%
String Object Access (Execution) 6.0±0.33µs 5.9±0.39µs +1.69%
String Object Access (Full) 227.1±15.99µs 263.8±21.66µs -13.91%
String comparison (Execution) 5.6±0.83µs 5.7±0.31µs -1.75%
String comparison (Full) 263.7±14.94µs 231.1±13.23µs +14.11%
String concatenation (Execution) 4.8±0.31µs 4.6±0.33µs +4.35%
String concatenation (Full) 226.8±15.27µs 233.9±14.58µs -3.04%
String copy (Execution) 4.0±0.26µs 4.0±0.29µs 0.00%
String copy (Full) 261.4±13.76µs 241.9±13.49µs +8.06%
Symbols (Execution) 2.8±0.18µs 2.9±0.16µs -3.45%
Symbols (Full) 205.7±14.17µs 212.8±14.04µs -3.34%

@github-actions
Copy link

Benchmark for 9881612

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 351.7±4.67ns 351.9±7.59ns -0.06%
Arithmetic operations (Full) 241.4±6.84µs 229.4±6.48µs +5.23%
Array access (Execution) 7.6±0.17µs 7.6±0.11µs 0.00%
Array access (Full) 249.8±4.32µs 247.0±4.43µs +1.13%
Array creation (Execution) 3.2±0.08ms 3.1±0.04ms +3.23%
Array creation (Full) 3.4±0.05ms 3.3±0.03ms +3.03%
Array pop (Execution) 1135.5±24.92µs 1095.4±26.01µs +3.66%
Array pop (Full) 1444.3±22.00µs 1401.9±20.21µs +3.02%
Boolean Object Access (Execution) 4.4±0.09µs 4.3±0.06µs +2.33%
Boolean Object Access (Full) 246.9±5.70µs 237.4±3.94µs +4.00%
Clean js (Execution) 698.0±19.31µs 688.8±10.17µs +1.34%
Clean js (Full) 969.4±19.70µs 939.9±20.73µs +3.14%
Clean js (Parser) 22.7±0.50µs 22.5±0.62µs +0.89%
Create Realm 429.9±9.80ns 441.1±8.11ns -2.54%
Dynamic Object Property Access (Execution) 5.1±0.20µs 5.0±0.07µs +2.00%
Dynamic Object Property Access (Full) 242.3±4.77µs 238.8±5.27µs +1.47%
Expression (Lexer) 2.2±0.05µs 2.2±0.05µs 0.00%
Expression (Parser) 5.1±0.12µs 5.0±0.10µs +2.00%
Fibonacci (Execution) 763.5±21.54µs 750.0±17.25µs +1.80%
Fibonacci (Full) 1013.3±19.04µs 1004.3±24.00µs +0.90%
For loop (Execution) 21.2±0.56µs 21.4±0.50µs -0.93%
For loop (Full) 263.8±7.15µs 259.0±4.53µs +1.85%
For loop (Lexer) 4.0±0.09µs 3.9±0.08µs +2.56%
For loop (Parser) 11.7±0.31µs 11.5±0.21µs +1.74%
Goal Symbols (Parser) 7.9±0.14µs 7.8±0.15µs +1.28%
Hello World (Lexer) 827.1±18.83ns 777.3±17.95ns +6.41%
Hello World (Parser) 2.0±0.05µs 2.1±0.10µs -4.76%
Long file (Parser) 6.0±0.27ms 5.8±0.07ms +3.45%
Mini js (Execution) 628.2±11.36µs 622.3±9.08µs +0.95%
Mini js (Full) 906.6±37.79µs 864.5±14.62µs +4.87%
Mini js (Parser) 20.1±0.32µs 20.1±0.74µs 0.00%
Number Object Access (Execution) 3.5±0.09µs 3.5±0.11µs 0.00%
Number Object Access (Full) 241.1±4.87µs 234.5±3.52µs +2.81%
Object Creation (Execution) 4.3±0.18µs 4.2±0.09µs +2.38%
Object Creation (Full) 292.5±4.50µs 287.6±5.57µs +1.70%
RegExp (Execution) 63.5±2.41µs 60.8±1.36µs +4.44%
RegExp (Full) 384.6±7.50µs 379.4±7.23µs +1.37%
RegExp Literal (Execution) 67.6±2.19µs 63.7±1.95µs +6.12%
RegExp Literal (Full) 311.1±6.42µs 307.2±8.17µs +1.27%
RegExp Literal Creation (Execution) 63.9±2.18µs 60.5±1.23µs +5.62%
RegExp Literal Creation (Full) 373.4±8.24µs 400.7±27.30µs -6.81%
Static Object Property Access (Execution) 4.5±0.15µs 4.5±0.08µs 0.00%
Static Object Property Access (Full) 241.3±8.74µs 249.7±10.99µs -3.36%
String Object Access (Execution) 6.5±0.21µs 6.4±0.10µs +1.56%
String Object Access (Full) 249.6±10.77µs 240.3±9.41µs +3.87%
String comparison (Execution) 5.9±0.09µs 5.8±0.09µs +1.72%
String comparison (Full) 244.3±4.22µs 239.7±3.33µs +1.92%
String concatenation (Execution) 4.7±0.10µs 4.7±0.11µs 0.00%
String concatenation (Full) 243.0±5.55µs 235.8±4.95µs +3.05%
String copy (Execution) 3.7±0.12µs 3.5±0.07µs +5.71%
String copy (Full) 237.3±4.58µs 230.6±4.72µs +2.91%
Symbols (Execution) 3.0±0.10µs 3.0±0.08µs 0.00%
Symbols (Full) 222.9±4.41µs 220.4±8.08µs +1.13%

@github-actions
Copy link

Benchmark for 5b4f38a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 335.6±21.01ns 353.3±13.68ns -5.01%
Arithmetic operations (Full) 253.2±16.55µs 248.5±13.04µs +1.89%
Array access (Execution) 8.1±0.41µs 8.5±0.43µs -4.71%
Array access (Full) 268.5±14.21µs 278.3±9.22µs -3.52%
Array creation (Execution) 3.0±0.11ms 3.1±0.13ms -3.23%
Array creation (Full) 3.5±0.16ms 3.6±0.11ms -2.78%
Array pop (Execution) 1053.3±52.11µs 1079.2±50.92µs -2.40%
Array pop (Full) 1506.8±70.13µs 1548.9±62.24µs -2.72%
Boolean Object Access (Execution) 4.7±0.28µs 4.9±0.18µs -4.08%
Boolean Object Access (Full) 259.3±12.33µs 256.0±11.33µs +1.29%
Clean js (Execution) 704.9±35.90µs 733.1±35.99µs -3.85%
Clean js (Full) 1000.8±52.05µs 1003.8±54.07µs -0.30%
Clean js (Parser) 24.5±1.49µs 24.9±1.58µs -1.61%
Create Realm 473.6±30.57ns 467.2±21.72ns +1.37%
Dynamic Object Property Access (Execution) 5.4±0.28µs 5.6±0.22µs -3.57%
Dynamic Object Property Access (Full) 273.2±11.18µs 270.7±16.93µs +0.92%
Expression (Lexer) 2.3±0.13µs 2.3±0.14µs 0.00%
Expression (Parser) 5.0±0.38µs 5.2±0.24µs -3.85%
Fibonacci (Execution) 876.0±42.57µs 876.4±52.97µs -0.05%
Fibonacci (Full) 1168.1±46.92µs 1215.6±41.31µs -3.91%
For loop (Execution) 22.4±1.02µs 22.7±1.15µs -1.32%
For loop (Full) 276.8±15.00µs 289.7±12.65µs -4.45%
For loop (Lexer) 4.0±0.17µs 4.0±0.18µs 0.00%
For loop (Parser) 12.0±0.66µs 11.9±0.76µs +0.84%
Goal Symbols (Parser) 8.1±0.73µs 8.2±0.48µs -1.22%
Hello World (Lexer) 810.9±59.56ns 837.6±53.65ns -3.19%
Hello World (Parser) 2.1±0.12µs 2.1±0.11µs 0.00%
Long file (Parser) 6.2±0.22ms 6.4±0.25ms -3.13%
Mini js (Execution) 635.2±33.25µs 665.0±37.08µs -4.48%
Mini js (Full) 906.3±41.00µs 923.9±48.90µs -1.90%
Mini js (Parser) 21.2±1.78µs 21.3±1.20µs -0.47%
Number Object Access (Execution) 3.8±0.36µs 3.9±0.16µs -2.56%
Number Object Access (Full) 253.4±12.61µs 261.2±8.29µs -2.99%
Object Creation (Execution) 4.7±0.26µs 4.8±0.21µs -2.08%
Object Creation (Full) 312.1±13.34µs 322.1±17.78µs -3.10%
RegExp (Execution) 68.0±3.98µs 65.9±3.58µs +3.19%
RegExp (Full) 420.1±37.39µs 418.8±20.46µs +0.31%
RegExp Literal (Execution) 70.8±3.85µs 72.4±2.86µs -2.21%
RegExp Literal (Full) 340.5±18.99µs 333.9±22.77µs +1.98%
RegExp Literal Creation (Execution) 69.8±8.13µs 67.2±2.98µs +3.87%
RegExp Literal Creation (Full) 417.2±17.00µs 419.2±27.41µs -0.48%
Static Object Property Access (Execution) 4.8±0.25µs 4.9±0.27µs -2.04%
Static Object Property Access (Full) 264.1±12.30µs 265.7±13.77µs -0.60%
String Object Access (Execution) 7.0±0.63µs 7.1±0.24µs -1.41%
String Object Access (Full) 261.8±9.47µs 259.6±12.24µs +0.85%
String comparison (Execution) 6.4±0.33µs 6.5±0.23µs -1.54%
String comparison (Full) 255.5±14.45µs 261.6±12.13µs -2.33%
String concatenation (Execution) 5.4±0.22µs 5.2±0.29µs +3.85%
String concatenation (Full) 260.8±17.24µs 264.5±15.08µs -1.40%
String copy (Execution) 4.1±0.24µs 4.2±0.17µs -2.38%
String copy (Full) 247.8±12.99µs 252.7±9.22µs -1.94%
Symbols (Execution) 3.2±0.15µs 3.2±0.21µs 0.00%
Symbols (Full) 233.0±10.69µs 241.4±9.15µs -3.48%

@HalidOdat HalidOdat force-pushed the feature/context branch 2 times, most recently from b726fdb to 969dc5d Compare September 1, 2020 14:59
@HalidOdat HalidOdat marked this pull request as ready for review September 1, 2020 15:01
@HalidOdat
Copy link
Member Author

This is ready for review/merge :)

@HalidOdat HalidOdat modified the milestones: v0.11.0, v0.10.0 Sep 1, 2020
@Razican Razican requested review from Razican, Lan2u and jasonwilliams and removed request for Razican and Lan2u September 2, 2020 13:49
@HalidOdat HalidOdat force-pushed the feature/context branch 2 times, most recently from 7e1bb78 to b4dc7f9 Compare September 2, 2020 17:17
@github-actions
Copy link

github-actions bot commented Sep 2, 2020

Benchmark for 59c9a92

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 353.0±15.99ns 367.7±15.66ns -4.00%
Arithmetic operations (Full) 257.3±11.11µs 241.8±8.88µs +6.41%
Array access (Execution) 7.7±0.43µs 8.1±0.47µs -4.94%
Array access (Full) 273.8±12.52µs 259.9±12.87µs +5.35%
Array creation (Execution) 3.3±0.10ms 3.3±0.09ms 0.00%
Array creation (Full) 3.9±0.14ms 3.7±0.12ms +5.41%
Array pop (Execution) 1175.6±40.68µs 1138.2±48.59µs +3.29%
Array pop (Full) 1722.1±55.91µs 1625.4±67.43µs +5.95%
Boolean Object Access (Execution) 4.7±0.24µs 4.6±0.18µs +2.17%
Boolean Object Access (Full) 271.6±9.28µs 260.5±13.25µs +4.26%
Clean js (Execution) 703.3±33.44µs 728.6±34.90µs -3.47%
Clean js (Full) 1068.0±25.77µs 1001.1±32.11µs +6.68%
Clean js (Parser) 36.1±2.62µs 34.4±1.53µs +4.94%
Create Realm 470.1±16.04ns 449.0±16.35ns +4.70%
Dynamic Object Property Access (Execution) 5.2±0.17µs 5.3±0.23µs -1.89%
Dynamic Object Property Access (Full) 269.2±17.68µs 263.7±10.40µs +2.09%
Expression (Parser) 6.8±0.12µs 6.6±0.26µs +3.03%
Fibonacci (Execution) 778.4±21.11µs 790.2±26.75µs -1.49%
Fibonacci (Full) 1046.7±40.96µs 1075.0±26.70µs -2.63%
For loop (Execution) 21.6±1.02µs 21.9±1.04µs -1.37%
For loop (Full) 277.9±15.80µs 271.2±10.47µs +2.47%
For loop (Parser) 17.6±0.68µs 16.3±0.76µs +7.98%
Goal Symbols (Parser) 11.9±0.19µs 11.6±0.56µs +2.59%
Hello World (Parser) 3.1±0.20µs 2.9±0.10µs +6.90%
Long file (Parser) 776.9±19.86ns 741.0±44.49ns +4.84%
Mini js (Execution) 647.2±35.85µs 640.2±22.81µs +1.09%
Mini js (Full) 976.0±15.67µs 944.4±37.34µs +3.35%
Mini js (Parser) 31.8±0.65µs 30.6±1.30µs +3.92%
Number Object Access (Execution) 3.7±0.22µs 3.8±0.19µs -2.63%
Number Object Access (Full) 264.2±12.24µs 253.5±7.08µs +4.22%
Object Creation (Execution) 4.3±0.20µs 4.4±0.22µs -2.27%
Object Creation (Full) 315.6±15.85µs 301.4±11.23µs +4.71%
RegExp (Execution) 66.9±3.25µs 65.6±2.29µs +1.98%
RegExp (Full) 347.8±27.95µs 329.3±62.67µs +5.62%
RegExp Literal (Execution) 66.4±4.03µs 65.4±2.62µs +1.53%
RegExp Literal (Full) 345.4±9.97µs 331.0±12.34µs +4.35%
RegExp Literal Creation (Execution) 63.7±2.75µs 63.9±2.53µs -0.31%
RegExp Literal Creation (Full) 416.0±8.05µs 394.0±15.29µs +5.58%
Static Object Property Access (Execution) 4.7±0.19µs 4.6±0.14µs +2.17%
Static Object Property Access (Full) 255.2±20.43µs 248.4±11.85µs +2.74%
String Object Access (Execution) 6.9±0.27µs 7.0±0.30µs -1.43%
String Object Access (Full) 277.6±25.80µs 260.9±21.11µs +6.40%
String comparison (Execution) 6.0±0.22µs 6.2±0.23µs -3.23%
String comparison (Full) 268.4±10.82µs 257.6±9.38µs +4.19%
String concatenation (Execution) 5.0±0.28µs 5.1±0.16µs -1.96%
String concatenation (Full) 262.4±13.70µs 251.5±13.35µs +4.33%
String copy (Execution) 3.7±0.18µs 3.8±0.16µs -2.63%
String copy (Full) 263.1±15.21µs 236.9±11.35µs +11.06%
Symbols (Execution) 3.1±0.19µs 3.1±0.15µs 0.00%
Symbols (Full) 247.8±37.84µs 231.0±10.28µs +7.27%

@github-actions
Copy link

github-actions bot commented Sep 2, 2020

Benchmark for 2f08743

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 375.9±10.55ns 374.3±13.26ns +0.43%
Arithmetic operations (Full) 256.3±10.72µs 260.2±9.59µs -1.50%
Array access (Execution) 8.1±0.16µs 8.1±0.14µs 0.00%
Array access (Full) 270.3±6.93µs 275.1±8.37µs -1.74%
Array creation (Execution) 3.5±0.07ms 3.4±0.09ms +2.94%
Array creation (Full) 3.9±0.10ms 3.8±0.10ms +2.63%
Array pop (Execution) 1227.5±18.38µs 1214.7±34.63µs +1.05%
Array pop (Full) 1737.9±77.61µs 1709.6±47.81µs +1.66%
Boolean Object Access (Execution) 5.0±0.23µs 4.9±0.22µs +2.04%
Boolean Object Access (Full) 261.3±7.23µs 268.1±7.60µs -2.54%
Clean js (Execution) 746.5±13.99µs 742.8±20.47µs +0.50%
Clean js (Full) 1047.9±28.31µs 1062.6±22.43µs -1.38%
Clean js (Parser) 36.1±0.97µs 36.3±1.35µs -0.55%
Create Realm 462.8±9.62ns 464.6±11.54ns -0.39%
Dynamic Object Property Access (Execution) 5.4±0.22µs 5.4±0.17µs 0.00%
Dynamic Object Property Access (Full) 267.9±5.90µs 269.0±8.17µs -0.41%
Expression (Parser) 7.1±0.29µs 6.9±0.18µs +2.90%
Fibonacci (Execution) 811.7±29.17µs 811.9±15.23µs -0.02%
Fibonacci (Full) 1100.9±32.16µs 1095.5±27.61µs +0.49%
For loop (Execution) 22.6±0.62µs 22.7±0.71µs -0.44%
For loop (Full) 286.7±12.17µs 290.4±8.46µs -1.27%
For loop (Parser) 17.7±0.66µs 17.6±0.67µs +0.57%
Goal Symbols (Parser) 12.0±0.53µs 12.0±0.55µs 0.00%
Hello World (Parser) 3.1±0.13µs 3.1±0.10µs 0.00%
Long file (Parser) 756.5±24.24ns 782.7±23.29ns -3.35%
Mini js (Execution) 678.2±18.27µs 676.2±18.18µs +0.30%
Mini js (Full) 998.4±66.81µs 976.0±20.75µs +2.30%
Mini js (Parser) 32.1±1.11µs 32.3±0.84µs -0.62%
Number Object Access (Execution) 3.9±0.10µs 3.9±0.15µs 0.00%
Number Object Access (Full) 261.0±14.15µs 265.1±8.66µs -1.55%
Object Creation (Execution) 4.6±0.13µs 4.5±0.10µs +2.22%
Object Creation (Full) 315.0±6.66µs 314.7±11.92µs +0.10%
RegExp (Execution) 69.2±2.72µs 69.4±2.25µs -0.29%
RegExp (Full) 344.4±13.84µs 348.9±11.02µs -1.29%
RegExp Literal (Execution) 69.1±3.61µs 69.6±2.76µs -0.72%
RegExp Literal (Full) 340.3±14.44µs 346.1±12.37µs -1.68%
RegExp Literal Creation (Execution) 66.5±1.85µs 65.4±1.46µs +1.68%
RegExp Literal Creation (Full) 425.6±23.11µs 418.8±12.05µs +1.62%
Static Object Property Access (Execution) 4.9±0.13µs 4.8±0.13µs +2.08%
Static Object Property Access (Full) 267.9±7.96µs 263.7±9.50µs +1.59%
String Object Access (Execution) 7.3±0.09µs 7.1±0.14µs +2.82%
String Object Access (Full) 262.6±7.70µs 274.5±5.17µs -4.34%
String comparison (Execution) 6.4±0.13µs 6.3±0.16µs +1.59%
String comparison (Full) 265.3±10.18µs 271.4±5.24µs -2.25%
String concatenation (Execution) 5.3±0.14µs 5.1±0.14µs +3.92%
String concatenation (Full) 261.6±4.35µs 268.2±7.60µs -2.46%
String copy (Execution) 3.9±0.20µs 3.9±0.13µs 0.00%
String copy (Full) 252.8±7.69µs 263.1±12.20µs -3.91%
Symbols (Execution) 3.2±0.05µs 3.2±0.11µs 0.00%
Symbols (Full) 236.3±6.12µs 242.7±12.20µs -2.64%

@github-actions
Copy link

github-actions bot commented Sep 2, 2020

Benchmark for 2950f6f

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 316.9±23.20ns 334.8±29.42ns -5.35%
Arithmetic operations (Full) 214.1±18.58µs 204.7±18.19µs +4.59%
Array access (Execution) 7.1±0.55µs 7.4±0.49µs -4.05%
Array access (Full) 222.8±17.03µs 226.6±20.38µs -1.68%
Array creation (Execution) 2.9±0.23ms 2.8±0.19ms +3.57%
Array creation (Full) 3.1±0.21ms 3.1±0.20ms 0.00%
Array pop (Execution) 992.6±77.82µs 1058.3±91.60µs -6.21%
Array pop (Full) 1498.1±131.48µs 1401.1±166.65µs +6.92%
Boolean Object Access (Execution) 4.2±0.30µs 4.1±0.26µs +2.44%
Boolean Object Access (Full) 215.8±17.61µs 226.8±19.63µs -4.85%
Clean js (Execution) 619.4±39.96µs 604.9±45.15µs +2.40%
Clean js (Full) 987.6±79.37µs 869.7±61.47µs +13.56%
Clean js (Parser) 31.0±2.25µs 29.9±2.13µs +3.68%
Create Realm 352.8±22.29ns 427.1±24.04ns -17.40%
Dynamic Object Property Access (Execution) 4.3±0.35µs 4.6±0.37µs -6.52%
Dynamic Object Property Access (Full) 234.8±17.89µs 205.6±11.75µs +14.20%
Expression (Parser) 6.5±0.52µs 5.7±0.45µs +14.04%
Fibonacci (Execution) 644.2±49.03µs 772.2±68.62µs -16.58%
Fibonacci (Full) 895.3±68.98µs 910.6±60.11µs -1.68%
For loop (Execution) 18.2±1.31µs 21.5±1.06µs -15.35%
For loop (Full) 248.5±19.68µs 236.8±17.11µs +4.94%
For loop (Parser) 13.4±0.70µs 14.2±1.12µs -5.63%
Goal Symbols (Parser) 9.9±0.81µs 9.8±0.99µs +1.02%
Hello World (Parser) 2.5±0.20µs 2.5±0.18µs 0.00%
Long file (Parser) 585.5±36.29ns 635.8±41.10ns -7.91%
Mini js (Execution) 540.2±49.71µs 543.7±39.78µs -0.64%
Mini js (Full) 905.3±69.73µs 788.8±57.88µs +14.77%
Mini js (Parser) 27.0±1.65µs 26.2±1.91µs +3.05%
Number Object Access (Execution) 3.3±0.29µs 3.4±0.28µs -2.94%
Number Object Access (Full) 207.1±15.36µs 238.3±11.25µs -13.09%
Object Creation (Execution) 3.7±0.32µs 4.1±0.29µs -9.76%
Object Creation (Full) 223.2±15.01µs 275.4±22.27µs -18.95%
RegExp (Execution) 62.4±4.62µs 57.0±4.46µs +9.47%
RegExp (Full) 287.9±21.89µs 308.3±22.41µs -6.62%
RegExp Literal (Execution) 56.7±5.39µs 56.8±4.76µs -0.18%
RegExp Literal (Full) 280.7±26.34µs 295.6±34.05µs -5.04%
RegExp Literal Creation (Execution) 53.8±4.30µs 52.8±3.68µs +1.89%
RegExp Literal Creation (Full) 280.5±29.33µs 327.9±23.70µs -14.46%
Static Object Property Access (Execution) 3.9±0.33µs 4.3±0.47µs -9.30%
Static Object Property Access (Full) 220.4±15.37µs 223.7±16.46µs -1.48%
String Object Access (Execution) 5.9±0.49µs 5.8±0.47µs +1.72%
String Object Access (Full) 224.2±22.20µs 226.0±18.74µs -0.80%
String comparison (Execution) 5.7±0.45µs 5.3±0.44µs +7.55%
String comparison (Full) 237.7±17.88µs 249.4±12.75µs -4.69%
String concatenation (Execution) 4.8±0.37µs 4.4±0.36µs +9.09%
String concatenation (Full) 216.2±20.24µs 244.1±18.61µs -11.43%
String copy (Execution) 3.4±0.24µs 3.3±0.30µs +3.03%
String copy (Full) 217.3±16.35µs 208.2±15.33µs +4.37%
Symbols (Execution) 2.6±0.24µs 2.7±0.22µs -3.70%
Symbols (Full) 201.3±16.19µs 196.3±16.15µs +2.55%

@Lan2u
Copy link

Lan2u commented Sep 6, 2020

Why don't we fix the deprecation warnings as part of this merge request?

Actually maybe disregard that, 1k+ warnings :O

@HalidOdat
Copy link
Member Author

HalidOdat commented Sep 6, 2020

Why don't we fix the deprecation warnings as part of this merge request?

Actually maybe disregard that, 1k+ warnings :O

A way that we can remove this is to set them to be pub(crate) this way it we can use them in the tests (for now, so we can refactor them later) and we will be able to remove the #[allow(deprecated)]

@github-actions
Copy link

github-actions bot commented Sep 6, 2020

Benchmark for a7bd429

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 389.6±4.30ns 392.0±8.23ns -0.61%
Arithmetic operations (Full) 265.4±10.21µs 265.1±3.97µs +0.11%
Array access (Execution) 8.5±0.13µs 8.5±0.13µs 0.00%
Array access (Full) 282.1±2.37µs 288.4±18.81µs -2.18%
Array creation (Execution) 3.6±0.05ms 3.4±0.04ms +5.88%
Array creation (Full) 4.1±0.04ms 3.8±0.06ms +7.89%
Array pop (Execution) 1297.9±42.57µs 1220.3±22.96µs +6.36%
Array pop (Full) 1872.7±45.06µs 1670.2±31.45µs +12.12%
Boolean Object Access (Execution) 5.1±0.15µs 5.1±0.14µs 0.00%
Boolean Object Access (Full) 275.1±4.04µs 276.8±8.81µs -0.61%
Clean js (Execution) 792.3±22.33µs 781.0±13.41µs +1.45%
Clean js (Full) 1114.6±18.92µs 1086.0±23.58µs +2.63%
Clean js (Parser) 37.7±1.21µs 37.7±0.77µs 0.00%
Create Realm 488.8±11.19ns 484.5±10.41ns +0.89%
Dynamic Object Property Access (Execution) 5.5±0.06µs 5.7±0.08µs -3.51%
Dynamic Object Property Access (Full) 276.2±10.19µs 280.1±9.08µs -1.39%
Expression (Parser) 7.1±0.14µs 7.2±0.08µs -1.39%
Fibonacci (Execution) 844.5±13.04µs 853.8±17.95µs -1.09%
Fibonacci (Full) 1143.6±21.20µs 1144.0±15.42µs -0.03%
For loop (Execution) 23.9±0.56µs 23.7±0.68µs +0.84%
For loop (Full) 299.9±9.77µs 301.9±9.10µs -0.66%
For loop (Parser) 18.2±0.21µs 18.2±0.72µs 0.00%
Goal Symbols (Parser) 12.4±0.48µs 12.4±0.19µs 0.00%
Hello World (Parser) 3.2±0.10µs 3.1±0.03µs +3.23%
Long file (Parser) 799.8±21.48ns 816.6±15.18ns -2.06%
Mini js (Execution) 710.8±20.27µs 706.3±21.50µs +0.64%
Mini js (Full) 1034.6±60.78µs 997.5±21.23µs +3.72%
Mini js (Parser) 33.1±1.32µs 33.2±0.82µs -0.30%
Number Object Access (Execution) 4.1±0.12µs 4.0±0.06µs +2.50%
Number Object Access (Full) 274.8±6.95µs 275.5±4.02µs -0.25%
Object Creation (Execution) 4.7±0.13µs 4.8±0.13µs -2.08%
Object Creation (Full) 273.4±4.03µs 331.2±6.28µs -17.45%
RegExp (Execution) 72.4±1.99µs 72.1±2.24µs +0.42%
RegExp (Full) 357.6±8.31µs 362.3±12.46µs -1.30%
RegExp Literal (Execution) 72.4±2.06µs 72.1±2.34µs +0.42%
RegExp Literal (Full) 358.2±16.40µs 357.7±7.13µs +0.14%
RegExp Literal Creation (Execution) 69.1±2.54µs 68.7±1.81µs +0.58%
RegExp Literal Creation (Full) 349.9±23.08µs 438.6±22.81µs -20.22%
Static Object Property Access (Execution) 5.0±0.07µs 5.0±0.09µs 0.00%
Static Object Property Access (Full) 272.0±4.13µs 278.4±5.21µs -2.30%
String Object Access (Execution) 7.5±0.14µs 7.4±0.15µs +1.35%
String Object Access (Full) 275.7±4.07µs 281.1±7.89µs -1.92%
String comparison (Execution) 6.6±0.10µs 6.7±0.26µs -1.49%
String comparison (Full) 276.6±4.73µs 282.2±5.53µs -1.98%
String concatenation (Execution) 5.4±0.11µs 5.4±0.07µs 0.00%
String concatenation (Full) 272.6±4.02µs 273.5±6.41µs -0.33%
String copy (Execution) 4.0±0.07µs 4.0±0.20µs 0.00%
String copy (Full) 265.4±4.74µs 266.5±4.90µs -0.41%
Symbols (Execution) 3.4±0.20µs 3.3±0.04µs +3.03%
Symbols (Full) 251.3±3.87µs 253.8±9.21µs -0.99%

@Lan2u
Copy link

Lan2u commented Sep 6, 2020

Why don't we fix the deprecation warnings as part of this merge request?
Actually maybe disregard that, 1k+ warnings :O

A way that we can remove this is to set them to be pub(crate) this way it we can use them in the tests (for now, so we can refactor them later) and we will be able to remove the #[allow(deprecated)]

I think keeping deprecated is best as it describes the situation well

@github-actions
Copy link

github-actions bot commented Sep 6, 2020

Benchmark for dca5d59

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 389.0±0.42ns 389.6±1.34ns -0.15%
Arithmetic operations (Full) 259.8±0.83µs 263.6±1.53µs -1.44%
Array access (Execution) 8.5±0.03µs 8.5±0.02µs 0.00%
Array access (Full) 281.3±1.05µs 287.3±0.63µs -2.09%
Array creation (Execution) 3.6±0.00ms 3.4±0.00ms +5.88%
Array creation (Full) 4.1±0.01ms 3.7±0.01ms +10.81%
Array pop (Execution) 1283.2±4.97µs 1201.5±4.92µs +6.80%
Array pop (Full) 1851.2±2.67µs 1650.5±1.58µs +12.16%
Boolean Object Access (Execution) 5.1±0.07µs 5.0±0.01µs +2.00%
Boolean Object Access (Full) 274.6±1.53µs 275.0±1.12µs -0.15%
Clean js (Execution) 776.1±3.94µs 762.7±3.67µs +1.76%
Clean js (Full) 1109.9±9.38µs 1076.4±8.19µs +3.11%
Clean js (Parser) 36.8±0.11µs 36.9±0.05µs -0.27%
Create Realm 482.0±0.40ns 481.0±0.31ns +0.21%
Dynamic Object Property Access (Execution) 5.6±0.02µs 5.6±0.02µs 0.00%
Dynamic Object Property Access (Full) 274.5±0.64µs 276.0±0.41µs -0.54%
Expression (Parser) 6.9±0.08µs 7.1±0.01µs -2.82%
Fibonacci (Execution) 840.8±1.67µs 840.3±2.91µs +0.06%
Fibonacci (Full) 1129.4±2.21µs 1152.5±1.81µs -2.00%
For loop (Execution) 23.4±0.12µs 23.4±0.07µs 0.00%
For loop (Full) 295.6±0.58µs 300.8±1.50µs -1.73%
For loop (Parser) 17.9±0.02µs 18.0±0.04µs -0.56%
Goal Symbols (Parser) 12.2±0.01µs 12.2±0.02µs 0.00%
Hello World (Parser) 3.1±0.01µs 3.2±0.02µs -3.13%
Long file (Parser) 793.4±1.40ns 795.7±10.64ns -0.29%
Mini js (Execution) 704.5±4.33µs 688.0±3.56µs +2.40%
Mini js (Full) 1020.9±4.39µs 991.6±5.49µs +2.95%
Mini js (Parser) 32.3±0.07µs 32.6±0.04µs -0.92%
Number Object Access (Execution) 4.0±0.00µs 4.0±0.01µs 0.00%
Number Object Access (Full) 267.9±0.54µs 271.4±0.40µs -1.29%
Object Creation (Execution) 4.7±0.02µs 4.7±0.01µs 0.00%
Object Creation (Full) 271.2±1.06µs 329.9±1.87µs -17.79%
RegExp (Execution) 70.8±1.22µs 71.2±1.26µs -0.56%
RegExp (Full) 352.3±0.90µs 355.7±0.93µs -0.96%
RegExp Literal (Execution) 70.9±1.25µs 71.1±1.30µs -0.28%
RegExp Literal (Full) 351.9±2.26µs 353.7±1.27µs -0.51%
RegExp Literal Creation (Execution) 67.9±1.05µs 67.7±1.14µs +0.30%
RegExp Literal Creation (Full) 340.4±1.51µs 428.7±2.06µs -20.60%
Static Object Property Access (Execution) 5.0±0.01µs 5.0±0.01µs 0.00%
Static Object Property Access (Full) 276.7±1.17µs 275.6±1.16µs +0.40%
String Object Access (Execution) 7.3±0.02µs 7.4±0.02µs -1.35%
String Object Access (Full) 274.0±2.81µs 277.7±0.59µs -1.33%
String comparison (Execution) 6.6±0.03µs 6.5±0.02µs +1.54%
String comparison (Full) 273.4±0.53µs 277.4±0.36µs -1.44%
String concatenation (Execution) 5.4±0.07µs 5.3±0.03µs +1.89%
String concatenation (Full) 267.5±0.55µs 271.0±0.51µs -1.29%
String copy (Execution) 4.0±0.01µs 3.9±0.01µs +2.56%
String copy (Full) 264.1±0.65µs 266.5±0.62µs -0.90%
Symbols (Execution) 3.3±0.01µs 3.3±0.01µs 0.00%
Symbols (Full) 247.0±0.36µs 251.0±1.11µs -1.59%

@HalidOdat
Copy link
Member Author

HalidOdat commented Sep 6, 2020

I think keeping deprecated is best as it describes the situation well

It would be much nicer if #[deprecated] did not give warnings for internal code/tests, sadly it does not. I made it only compile in test mode so we don't have to allow deprecated.

What do you think? @Lan2u

@github-actions
Copy link

github-actions bot commented Sep 6, 2020

Benchmark for 8c496c5

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 347.2±19.34ns 375.0±16.59ns -7.41%
Arithmetic operations (Full) 244.9±14.44µs 258.2±13.35µs -5.15%
Array access (Execution) 8.2±0.44µs 8.5±0.48µs -3.53%
Array access (Full) 273.1±13.52µs 288.0±29.21µs -5.17%
Array creation (Execution) 2.9±0.14ms 3.1±0.12ms -6.45%
Array creation (Full) 3.4±0.11ms 3.5±0.12ms -2.86%
Array pop (Execution) 1045.1±52.95µs 1089.0±50.91µs -4.03%
Array pop (Full) 1558.5±70.08µs 1557.5±60.24µs +0.06%
Boolean Object Access (Execution) 4.7±0.21µs 4.8±0.27µs -2.08%
Boolean Object Access (Full) 274.1±10.80µs 262.7±13.09µs +4.34%
Clean js (Execution) 701.1±28.45µs 713.0±26.17µs -1.67%
Clean js (Full) 989.9±42.87µs 1083.5±78.58µs -8.64%
Clean js (Parser) 35.7±2.30µs 36.1±2.11µs -1.11%
Create Realm 446.1±26.20ns 441.8±23.23ns +0.97%
Dynamic Object Property Access (Execution) 5.5±0.42µs 5.5±0.24µs 0.00%
Dynamic Object Property Access (Full) 270.3±17.89µs 269.9±13.62µs +0.15%
Expression (Parser) 6.3±0.30µs 6.3±0.36µs 0.00%
Fibonacci (Execution) 874.4±33.28µs 878.8±31.72µs -0.50%
Fibonacci (Full) 1143.9±53.36µs 1196.1±76.90µs -4.36%
For loop (Execution) 23.1±1.93µs 22.7±1.05µs +1.76%
For loop (Full) 287.9±15.74µs 294.1±19.90µs -2.11%
For loop (Parser) 16.8±0.71µs 17.4±1.06µs -3.45%
Goal Symbols (Parser) 11.6±0.66µs 11.7±0.71µs -0.85%
Hello World (Parser) 3.0±0.19µs 2.9±0.14µs +3.45%
Long file (Parser) 749.3±47.57ns 754.6±43.80ns -0.70%
Mini js (Execution) 632.2±34.11µs 671.5±41.69µs -5.85%
Mini js (Full) 911.4±38.49µs 924.4±44.93µs -1.41%
Mini js (Parser) 31.6±2.12µs 30.2±1.22µs +4.64%
Number Object Access (Execution) 3.9±0.15µs 3.8±0.25µs +2.63%
Number Object Access (Full) 274.0±15.75µs 261.2±19.76µs +4.90%
Object Creation (Execution) 4.7±0.21µs 4.7±0.27µs 0.00%
Object Creation (Full) 263.7±17.03µs 340.4±17.08µs -22.53%
RegExp (Execution) 71.5±3.47µs 70.3±3.42µs +1.71%
RegExp (Full) 345.8±14.82µs 343.2±15.31µs +0.76%
RegExp Literal (Execution) 76.5±4.15µs 70.4±3.48µs +8.66%
RegExp Literal (Full) 336.7±11.25µs 348.3±23.20µs -3.33%
RegExp Literal Creation (Execution) 67.4±4.34µs 66.7±3.25µs +1.05%
RegExp Literal Creation (Full) 337.0±27.25µs 404.5±17.66µs -16.69%
Static Object Property Access (Execution) 5.1±0.25µs 5.1±0.27µs 0.00%
Static Object Property Access (Full) 264.9±15.28µs 265.7±13.27µs -0.30%
String Object Access (Execution) 6.9±0.31µs 6.9±0.30µs 0.00%
String Object Access (Full) 274.5±20.07µs 268.5±15.39µs +2.23%
String comparison (Execution) 6.3±0.43µs 6.4±0.31µs -1.56%
String comparison (Full) 267.7±13.77µs 264.5±11.21µs +1.21%
String concatenation (Execution) 5.2±0.28µs 5.3±0.29µs -1.89%
String concatenation (Full) 258.9±13.48µs 261.0±12.87µs -0.80%
String copy (Execution) 3.9±0.17µs 4.2±0.21µs -7.14%
String copy (Full) 252.8±10.64µs 261.0±14.23µs -3.14%
Symbols (Execution) 3.3±0.19µs 3.4±0.12µs -2.94%
Symbols (Full) 235.1±12.66µs 243.5±20.70µs -3.45%

@Lan2u
Copy link

Lan2u commented Sep 6, 2020

I think keeping deprecated is best as it describes the situation well

It would be much nicer if #[deprecated] did not give warnings for internal code/tests, sadly it does not. I made it only compile in test mode so we don't have to allow deprecated.

What do you think? @Lan2u

Yeah, it is a nice solution and to be honest, just having a forward/forward_val/exec which internally uses the new context::exec() is not a bad longer-term solution as to me this is just the same as having a test helper function.

@github-actions
Copy link

github-actions bot commented Sep 6, 2020

Benchmark for b4738ee

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 360.2±16.20ns 377.0±14.28ns -4.46%
Arithmetic operations (Full) 244.4±12.47µs 242.6±10.95µs +0.74%
Array access (Execution) 7.7±0.42µs 8.1±0.30µs -4.94%
Array access (Full) 269.9±9.66µs 267.3±18.16µs +0.97%
Array creation (Execution) 3.3±0.14ms 3.4±0.08ms -2.94%
Array creation (Full) 3.7±0.10ms 3.5±0.13ms +5.71%
Array pop (Execution) 1208.8±51.05µs 1196.5±42.66µs +1.03%
Array pop (Full) 1646.9±76.15µs 1568.6±67.88µs +4.99%
Boolean Object Access (Execution) 4.8±0.25µs 4.7±0.22µs +2.13%
Boolean Object Access (Full) 259.6±8.79µs 250.1±16.98µs +3.80%
Clean js (Execution) 724.3±34.45µs 709.3±40.76µs +2.11%
Clean js (Full) 1013.3±65.97µs 1000.0±84.83µs +1.33%
Clean js (Parser) 35.6±1.85µs 35.2±1.30µs +1.14%
Create Realm 459.7±22.78ns 463.2±20.87ns -0.76%
Dynamic Object Property Access (Execution) 5.4±0.18µs 5.4±0.28µs 0.00%
Dynamic Object Property Access (Full) 252.1±12.72µs 261.0±11.83µs -3.41%
Expression (Parser) 6.7±0.25µs 6.6±0.43µs +1.52%
Fibonacci (Execution) 790.7±38.39µs 793.6±45.03µs -0.37%
Fibonacci (Full) 1089.4±37.22µs 1066.0±46.81µs +2.20%
For loop (Execution) 21.6±1.00µs 21.9±0.77µs -1.37%
For loop (Full) 283.6±12.31µs 277.0±12.81µs +2.38%
For loop (Parser) 16.7±0.88µs 17.3±0.72µs -3.47%
Goal Symbols (Parser) 11.5±0.73µs 12.0±0.36µs -4.17%
Hello World (Parser) 3.0±0.11µs 3.0±0.16µs 0.00%
Long file (Parser) 735.2±40.03ns 773.4±87.16ns -4.94%
Mini js (Execution) 639.8±37.19µs 655.4±34.82µs -2.38%
Mini js (Full) 939.4±45.11µs 925.4±38.92µs +1.51%
Mini js (Parser) 31.0±0.89µs 31.3±1.34µs -0.96%
Number Object Access (Execution) 3.8±0.17µs 3.7±0.14µs +2.70%
Number Object Access (Full) 259.7±11.31µs 252.9±12.89µs +2.69%
Object Creation (Execution) 4.6±0.18µs 4.5±0.23µs +2.22%
Object Creation (Full) 252.8±19.63µs 312.0±13.99µs -18.97%
RegExp (Execution) 66.9±3.17µs 66.3±3.09µs +0.90%
RegExp (Full) 340.4±22.13µs 335.0±16.21µs +1.61%
RegExp Literal (Execution) 66.9±4.05µs 67.0±2.67µs -0.15%
RegExp Literal (Full) 326.8±18.13µs 329.8±19.77µs -0.91%
RegExp Literal Creation (Execution) 65.4±2.46µs 63.0±2.91µs +3.81%
RegExp Literal Creation (Full) 320.6±16.07µs 406.6±20.20µs -21.15%
Static Object Property Access (Execution) 4.8±0.16µs 4.9±1.17µs -2.04%
Static Object Property Access (Full) 254.5±9.73µs 261.7±25.90µs -2.75%
String Object Access (Execution) 7.0±0.27µs 7.1±0.22µs -1.41%
String Object Access (Full) 250.5±17.34µs 268.6±16.31µs -6.74%
String comparison (Execution) 6.2±0.28µs 6.1±0.33µs +1.64%
String comparison (Full) 259.8±13.10µs 260.3±11.19µs -0.19%
String concatenation (Execution) 5.0±0.23µs 4.9±0.31µs +2.04%
String concatenation (Full) 263.6±54.60µs 249.8±11.69µs +5.52%
String copy (Execution) 3.8±0.69µs 3.9±0.21µs -2.56%
String copy (Full) 251.9±35.55µs 246.8±15.12µs +2.07%
Symbols (Execution) 3.1±0.22µs 3.2±0.12µs -3.13%
Symbols (Full) 236.0±10.32µs 231.5±10.74µs +1.94%

 - Move `Console` to `Context`
 - Change `Context::global()` to `Context::global_object()`
 - Remove some `use std::borrow::Borrow`
 - Add some pub exports
 - Add `Context::eval()`
 - Deprecate forward_val, forward, exec
 - Make boa_cli use Context::eval()
 - Deprecated forward forward_val and exec
 - Make deprecated functions only compile in test mode
@github-actions
Copy link

github-actions bot commented Sep 7, 2020

Benchmark for 30c88cc

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 380.7±8.92ns 378.0±12.35ns +0.71%
Arithmetic operations (Full) 255.7±9.42µs 256.4±21.12µs -0.27%
Array access (Execution) 8.3±0.42µs 8.3±0.23µs 0.00%
Array access (Full) 277.5±11.14µs 276.0±8.76µs +0.54%
Array creation (Execution) 3.4±0.07ms 3.2±0.06ms +6.25%
Array creation (Full) 3.8±0.11ms 3.9±0.10ms -2.56%
Array pop (Execution) 1239.4±34.80µs 1148.5±56.39µs +7.91%
Array pop (Full) 1715.7±31.14µs 1733.3±53.66µs -1.02%
Boolean Object Access (Execution) 4.9±0.14µs 4.9±0.14µs 0.00%
Boolean Object Access (Full) 267.4±7.41µs 266.7±9.19µs +0.26%
Clean js (Execution) 763.6±35.01µs 738.4±19.35µs +3.41%
Clean js (Full) 1063.1±49.38µs 1086.8±45.77µs -2.18%
Clean js (Parser) 36.8±1.71µs 35.9±1.22µs +2.51%
Create Realm 462.6±13.86ns 477.1±27.31ns -3.04%
Dynamic Object Property Access (Execution) 5.4±0.12µs 5.6±0.18µs -3.57%
Dynamic Object Property Access (Full) 268.1±9.32µs 262.6±9.24µs +2.09%
Expression (Parser) 6.9±0.30µs 6.8±0.24µs +1.47%
Fibonacci (Execution) 808.6±14.49µs 815.4±25.64µs -0.83%
Fibonacci (Full) 1127.6±49.01µs 1109.0±49.93µs +1.68%
For loop (Execution) 22.9±1.11µs 22.8±0.52µs +0.44%
For loop (Full) 287.8±10.49µs 289.0±9.99µs -0.42%
For loop (Parser) 17.6±0.50µs 17.9±1.31µs -1.68%
Goal Symbols (Parser) 11.9±0.40µs 12.0±0.26µs -0.83%
Hello World (Parser) 3.1±0.07µs 3.1±0.68µs 0.00%
Long file (Parser) 774.8±18.48ns 774.9±27.19ns -0.01%
Mini js (Execution) 678.1±13.32µs 668.3±12.53µs +1.47%
Mini js (Full) 980.7±37.17µs 984.7±28.90µs -0.41%
Mini js (Parser) 32.8±3.48µs 32.0±1.46µs +2.50%
Number Object Access (Execution) 3.9±0.08µs 3.9±0.14µs 0.00%
Number Object Access (Full) 265.7±8.97µs 261.2±6.87µs +1.72%
Object Creation (Execution) 4.6±0.15µs 4.6±0.10µs 0.00%
Object Creation (Full) 268.9±7.98µs 316.4±12.88µs -15.01%
RegExp (Execution) 69.7±3.20µs 69.8±2.33µs -0.14%
RegExp (Full) 353.7±15.81µs 345.2±9.53µs +2.46%
RegExp Literal (Execution) 69.1±1.78µs 70.0±2.42µs -1.29%
RegExp Literal (Full) 343.3±15.40µs 337.7±12.05µs +1.66%
RegExp Literal Creation (Execution) 65.5±2.36µs 66.2±2.45µs -1.06%
RegExp Literal Creation (Full) 340.2±10.04µs 414.5±15.01µs -17.93%
Static Object Property Access (Execution) 4.9±0.20µs 4.8±0.15µs +2.08%
Static Object Property Access (Full) 265.2±12.16µs 264.9±8.26µs +0.11%
String Object Access (Execution) 7.2±0.20µs 7.1±0.26µs +1.41%
String Object Access (Full) 268.0±9.86µs 268.8±10.36µs -0.30%
String comparison (Execution) 6.3±0.16µs 6.4±0.24µs -1.56%
String comparison (Full) 268.0±6.34µs 266.9±11.00µs +0.41%
String concatenation (Execution) 5.2±0.19µs 5.2±0.21µs 0.00%
String concatenation (Full) 263.9±8.33µs 262.1±10.06µs +0.69%
String copy (Execution) 3.9±0.11µs 3.9±0.12µs 0.00%
String copy (Full) 257.0±5.40µs 255.4±14.16µs +0.63%
Symbols (Execution) 3.1±0.07µs 3.2±0.10µs -3.13%
Symbols (Full) 244.6±14.42µs 240.4±8.55µs +1.75%

@HalidOdat HalidOdat merged commit edfafc4 into master Sep 7, 2020
@HalidOdat HalidOdat deleted the feature/context branch September 7, 2020 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants