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

Implement Set builtin object #1111

Merged
merged 15 commits into from
May 20, 2021
Merged

Implement Set builtin object #1111

merged 15 commits into from
May 20, 2021

Conversation

RageKnify
Copy link
Contributor

@RageKnify RageKnify commented Feb 3, 2021

This Pull Request fixes/closes #400.

Besides implementing Set this PR also changes the following:

  • Change Value::hash so that 1i32 == 1f64
  • Fix Map.prototype.length (was 1, should be 0 because the argument is optional)
  • Fix msg for invoking Map without new (copied V8's message, gives more information)
  • Simplify calculation of map size when displaying Maps (get size from the OrderedMap rather than going throught the property
  • Introduce IteratorClose
  • Fix switching between PropertyDescriptor kinds
  • Fix deletion of accessor properties
  • Add equality check for Value::Symbol

The change to Value::hash was a bandaid fix to the fact that incrementing/decrementing integers with ++/-- results in a float, that should still be addressed, but I think this change would still be needed.

ps: I'll leave the remaining tests failing, currently failing tests [19] can be grouped by:

@RageKnify RageKnify added the builtins PRs and Issues related to builtins/intrinsics label Feb 3, 2021
@RageKnify RageKnify added the blocked Waiting for another code change label Feb 3, 2021
@github-actions
Copy link

github-actions bot commented Feb 3, 2021

Test262 conformance changes:

Test result master count PR count difference
Total 78,701 78,701 0
Passed 25,752 26,373 +621
Ignored 15,519 15,519 0
Failed 37,430 36,809 -621
Panics 27 27 0
Conformance 32.72% 33.51% +0.79%

@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #1111 (4422d34) into master (9e0cab5) will increase coverage by 0.27%.
The diff coverage is 66.10%.

❗ Current head 4422d34 differs from pull request most recent head c6cba8c. Consider uploading reports for the commit c6cba8c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
+ Coverage   58.53%   58.80%   +0.27%     
==========================================
  Files         176      179       +3     
  Lines       12547    12821     +274     
==========================================
+ Hits         7344     7540     +196     
- Misses       5203     5281      +78     
Impacted Files Coverage Δ
boa/src/builtins/mod.rs 20.58% <0.00%> (-0.63%) ⬇️
boa/src/property/mod.rs 61.06% <ø> (+4.58%) ⬆️
boa/src/value/equality.rs 70.12% <0.00%> (-0.93%) ⬇️
boa/src/object/internal_methods.rs 56.34% <20.00%> (-0.74%) ⬇️
boa/src/builtins/iterable/mod.rs 75.80% <21.42%> (-15.87%) ⬇️
boa/src/object/mod.rs 51.01% <50.00%> (+1.53%) ⬆️
boa/src/builtins/set/ordered_set.rs 64.28% <64.28%> (ø)
boa/src/builtins/set/mod.rs 71.62% <71.62%> (ø)
boa/src/builtins/set/set_iterator.rs 72.54% <72.54%> (ø)
boa/src/value/display.rs 89.81% <90.00%> (+4.66%) ⬆️
... and 10 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 3f7f8c0...c6cba8c. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 3, 2021

Benchmark for df00d23

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 302.9±0.10ns 306.8±4.09ns -1.27%
Arithmetic operations (Full) 207.8±0.37µs 193.2±0.44µs +7.56%
Array access (Execution) 5.2±0.07µs 5.5±0.03µs -5.45%
Array access (Full) 226.6±0.31µs 214.7±0.25µs +5.54%
Array creation (Execution) 2.7±0.01ms 2.5±0.00ms +8.00%
Array creation (Full) 2.6±0.00ms 2.7±0.00ms -3.70%
Array pop (Execution) 845.7±3.08µs 807.2±2.85µs +4.77%
Array pop (Full) 1161.2±1.95µs 1168.5±0.99µs -0.62%
Boolean Object Access (Execution) 4.6±0.01µs 4.4±0.00µs +4.55%
Boolean Object Access (Full) 226.3±0.44µs 209.1±0.27µs +8.23%
Clean js (Execution) 577.4±3.49µs 575.6±3.21µs +0.31%
Clean js (Full) 824.0±5.51µs 815.4±5.10µs +1.05%
Clean js (Parser) 35.1±0.04µs 34.9±0.05µs +0.57%
Create Realm 380.9±0.45ns 375.8±3.93ns +1.36%
Dynamic Object Property Access (Execution) 4.3±0.01µs 4.3±0.01µs 0.00%
Dynamic Object Property Access (Full) 227.0±0.35µs 211.2±0.38µs +7.48%
Expression (Parser) 5.9±0.01µs 5.8±0.00µs +1.72%
Fibonacci (Execution) 727.1±1.51µs 717.7±1.25µs +1.31%
Fibonacci (Full) 960.9±1.38µs 954.7±1.15µs +0.65%
For loop (Execution) 20.0±0.07µs 19.4±0.04µs +3.09%
For loop (Full) 242.9±0.45µs 228.4±0.26µs +6.35%
For loop (Parser) 16.7±0.02µs 16.6±0.02µs +0.60%
Goal Symbols (Parser) 11.7±0.19µs 11.7±0.02µs 0.00%
Hello World (Parser) 3.1±0.02µs 3.1±0.01µs 0.00%
Long file (Parser) 714.0±0.31ns 717.9±0.27ns -0.54%
Mini js (Execution) 518.4±2.54µs 516.3±2.65µs +0.41%
Mini js (Full) 758.1±3.91µs 742.5±8.49µs +2.10%
Mini js (Parser) 31.0±0.02µs 30.8±0.02µs +0.65%
Number Object Access (Execution) 3.6±0.01µs 3.4±0.04µs +5.88%
Number Object Access (Full) 220.4±0.35µs 206.5±0.25µs +6.73%
Object Creation (Execution) 3.6±0.01µs 3.6±0.01µs 0.00%
Object Creation (Full) 218.9±0.26µs 205.8±0.28µs +6.37%
RegExp (Execution) 8.2±0.02µs 8.1±0.04µs +1.23%
RegExp (Full) 230.0±0.36µs 212.0±0.29µs +8.49%
RegExp Literal (Execution) 9.3±0.02µs 9.3±0.03µs 0.00%
RegExp Literal (Full) 233.7±1.41µs 214.9±0.23µs +8.75%
RegExp Literal Creation (Execution) 8.2±0.01µs 8.1±0.03µs +1.23%
RegExp Literal Creation (Full) 225.6±0.26µs 210.5±0.35µs +7.17%
Static Object Property Access (Execution) 3.8±0.02µs 3.9±0.01µs -2.56%
Static Object Property Access (Full) 220.9±2.54µs 207.4±0.24µs +6.51%
String Object Access (Execution) 6.2±0.03µs 6.0±0.01µs +3.33%
String Object Access (Full) 225.9±0.47µs 213.3±1.35µs +5.91%
String comparison (Execution) 5.7±0.02µs 5.4±0.02µs +5.56%
String comparison (Full) 223.9±0.35µs 211.1±0.30µs +6.06%
String concatenation (Execution) 4.5±0.03µs 4.4±0.02µs +2.27%
String concatenation (Full) 221.4±0.32µs 205.0±0.29µs +8.00%
String copy (Execution) 3.4±0.01µs 3.4±0.01µs 0.00%
String copy (Full) 214.4±0.38µs 200.2±1.11µs +7.09%
Symbols (Execution) 2.8±0.01µs 2.8±0.00µs 0.00%
Symbols (Full) 208.0±1.75µs 196.2±0.62µs +6.01%

@github-actions
Copy link

github-actions bot commented Feb 3, 2021

Benchmark for 5f30569

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 340.5±14.03ns 343.0±12.92ns -0.73%
Arithmetic operations (Full) 243.6±8.99µs 223.3±7.38µs +9.09%
Array access (Execution) 5.9±0.20µs 6.2±0.18µs -4.84%
Array access (Full) 267.5±6.81µs 242.5±6.96µs +10.31%
Array creation (Execution) 3.1±0.09ms 2.9±0.10ms +6.90%
Array creation (Full) 3.0±0.10ms 3.1±0.10ms -3.23%
Array pop (Execution) 954.9±36.27µs 922.0±25.86µs +3.57%
Array pop (Full) 1351.6±33.88µs 1312.1±51.84µs +3.01%
Boolean Object Access (Execution) 5.1±0.18µs 4.9±0.21µs +4.08%
Boolean Object Access (Full) 264.2±7.17µs 244.8±7.85µs +7.92%
Clean js (Execution) 659.3±21.18µs 651.2±22.09µs +1.24%
Clean js (Full) 932.0±31.24µs 950.6±20.44µs -1.96%
Clean js (Parser) 38.5±1.22µs 38.5±1.16µs 0.00%
Create Realm 438.2±15.20ns 444.0±13.50ns -1.31%
Dynamic Object Property Access (Execution) 4.9±0.15µs 4.8±0.22µs +2.08%
Dynamic Object Property Access (Full) 263.0±8.20µs 240.3±9.32µs +9.45%
Expression (Parser) 6.6±0.29µs 6.6±0.24µs 0.00%
Fibonacci (Execution) 809.6±27.60µs 827.7±14.63µs -2.19%
Fibonacci (Full) 1105.0±23.59µs 1095.9±27.27µs +0.83%
For loop (Execution) 22.4±0.79µs 22.5±0.75µs -0.44%
For loop (Full) 280.9±8.21µs 265.1±6.21µs +5.96%
For loop (Parser) 18.6±0.56µs 18.4±0.63µs +1.09%
Goal Symbols (Parser) 13.2±0.34µs 12.9±0.44µs +2.33%
Hello World (Parser) 3.4±0.11µs 3.4±0.11µs 0.00%
Long file (Parser) 856.4±15.73ns 793.4±31.20ns +7.94%
Mini js (Execution) 593.3±20.29µs 596.2±12.93µs -0.49%
Mini js (Full) 878.5±20.30µs 826.2±26.06µs +6.33%
Mini js (Parser) 33.3±1.40µs 33.5±1.38µs -0.60%
Number Object Access (Execution) 3.9±0.17µs 3.9±0.16µs 0.00%
Number Object Access (Full) 252.3±8.14µs 240.4±5.23µs +4.95%
Object Creation (Execution) 4.2±0.16µs 4.1±0.15µs +2.44%
Object Creation (Full) 278.6±17.24µs 230.4±8.21µs +20.92%
RegExp (Execution) 9.3±0.26µs 9.1±0.39µs +2.20%
RegExp (Full) 263.1±6.47µs 242.4±10.25µs +8.54%
RegExp Literal (Execution) 10.4±0.43µs 10.8±0.21µs -3.70%
RegExp Literal (Full) 274.2±7.64µs 242.6±9.36µs +13.03%
RegExp Literal Creation (Execution) 9.3±0.22µs 9.1±0.33µs +2.20%
RegExp Literal Creation (Full) 272.7±17.90µs 239.6±6.66µs +13.81%
Static Object Property Access (Execution) 4.4±0.13µs 4.5±0.16µs -2.22%
Static Object Property Access (Full) 263.4±2.83µs 237.3±10.30µs +11.00%
String Object Access (Execution) 7.2±0.18µs 7.0±0.21µs +2.86%
String Object Access (Full) 257.5±7.84µs 247.0±7.25µs +4.25%
String comparison (Execution) 6.5±0.24µs 6.2±0.26µs +4.84%
String comparison (Full) 260.3±10.20µs 239.5±9.49µs +8.68%
String concatenation (Execution) 5.0±0.20µs 5.2±0.13µs -3.85%
String concatenation (Full) 255.0±7.33µs 237.4±7.60µs +7.41%
String copy (Execution) 3.9±0.17µs 4.0±0.28µs -2.50%
String copy (Full) 246.5±8.72µs 226.9±8.07µs +8.64%
Symbols (Execution) 3.2±0.11µs 3.3±0.10µs -3.03%
Symbols (Full) 236.6±8.76µs 228.6±5.23µs +3.50%

@RageKnify RageKnify added this to the v0.12.0 milestone Feb 3, 2021
@github-actions
Copy link

github-actions bot commented Feb 3, 2021

Benchmark for d18aa53

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 322.7±25.49ns 323.5±18.04ns -0.25%
Arithmetic operations (Full) 257.3±16.34µs 236.1±10.20µs +8.98%
Array access (Execution) 7.0±0.32µs 7.0±0.25µs 0.00%
Array access (Full) 278.8±14.89µs 265.5±15.26µs +5.01%
Array creation (Execution) 2.8±0.10ms 2.7±0.14ms +3.70%
Array creation (Full) 2.8±0.11ms 2.8±0.16ms 0.00%
Array pop (Execution) 848.2±31.96µs 836.9±46.12µs +1.35%
Array pop (Full) 1281.0±72.09µs 1246.6±62.57µs +2.76%
Boolean Object Access (Execution) 5.0±0.26µs 5.1±0.28µs -1.96%
Boolean Object Access (Full) 273.9±13.47µs 255.9±16.98µs +7.03%
Clean js (Execution) 657.2±32.88µs 646.2±34.83µs +1.70%
Clean js (Full) 926.4±41.08µs 929.4±46.01µs -0.32%
Clean js (Parser) 39.9±2.57µs 38.6±2.58µs +3.37%
Create Realm 409.8±21.49ns 428.7±25.24ns -4.41%
Dynamic Object Property Access (Execution) 5.1±0.31µs 5.8±0.71µs -12.07%
Dynamic Object Property Access (Full) 272.7±16.43µs 265.2±16.14µs +2.83%
Expression (Parser) 6.4±0.47µs 6.3±0.40µs +1.59%
Fibonacci (Execution) 957.9±61.61µs 942.9±31.08µs +1.59%
Fibonacci (Full) 1160.5±64.07µs 1156.8±47.65µs +0.32%
For loop (Execution) 23.6±1.34µs 24.9±2.61µs -5.22%
For loop (Full) 287.0±14.61µs 274.9±14.97µs +4.40%
For loop (Parser) 18.1±1.02µs 18.5±1.11µs -2.16%
Goal Symbols (Parser) 12.6±0.77µs 12.5±0.64µs +0.80%
Hello World (Parser) 3.3±0.16µs 3.4±0.17µs -2.94%
Long file (Parser) 718.9±32.68ns 729.8±64.86ns -1.49%
Mini js (Execution) 570.7±36.36µs 573.1±33.13µs -0.42%
Mini js (Full) 848.4±45.91µs 840.5±38.91µs +0.94%
Mini js (Parser) 34.1±1.88µs 33.9±1.89µs +0.59%
Number Object Access (Execution) 4.1±0.25µs 3.9±0.22µs +5.13%
Number Object Access (Full) 263.0±12.10µs 255.4±21.71µs +2.98%
Object Creation (Execution) 4.5±0.19µs 4.7±0.36µs -4.26%
Object Creation (Full) 269.7±19.23µs 253.7±17.40µs +6.31%
RegExp (Execution) 9.1±0.44µs 10.3±1.49µs -11.65%
RegExp (Full) 280.2±14.09µs 260.9±12.91µs +7.40%
RegExp Literal (Execution) 10.4±0.65µs 10.6±0.54µs -1.89%
RegExp Literal (Full) 278.1±14.58µs 267.2±16.97µs +4.08%
RegExp Literal Creation (Execution) 9.1±0.42µs 9.8±0.72µs -7.14%
RegExp Literal Creation (Full) 275.3±15.62µs 256.8±14.27µs +7.20%
Static Object Property Access (Execution) 4.8±0.34µs 5.0±0.25µs -4.00%
Static Object Property Access (Full) 266.6±15.26µs 254.5±12.20µs +4.75%
String Object Access (Execution) 7.1±0.35µs 7.1±0.39µs 0.00%
String Object Access (Full) 272.1±13.91µs 257.9±19.25µs +5.51%
String comparison (Execution) 6.4±0.37µs 6.5±0.71µs -1.54%
String comparison (Full) 274.3±12.50µs 252.4±13.48µs +8.68%
String concatenation (Execution) 5.4±0.25µs 5.2±0.31µs +3.85%
String concatenation (Full) 280.2±18.93µs 261.2±16.05µs +7.27%
String copy (Execution) 4.1±0.29µs 3.9±0.19µs +5.13%
String copy (Full) 260.9±11.65µs 247.7±12.60µs +5.33%
Symbols (Execution) 3.4±0.20µs 3.8±0.13µs -10.53%
Symbols (Full) 245.4±11.67µs 242.0±11.97µs +1.40%

@RageKnify RageKnify removed the blocked Waiting for another code change label Feb 6, 2021
@github-actions
Copy link

github-actions bot commented Feb 6, 2021

Benchmark for c12c36a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 302.5±0.15ns 300.0±0.12ns +0.83%
Arithmetic operations (Full) 212.3±0.47µs 199.5±0.73µs +6.42%
Array access (Execution) 5.2±0.01µs 5.3±0.02µs -1.89%
Array access (Full) 228.0±0.28µs 216.0±0.71µs +5.56%
Array creation (Execution) 2.4±0.01ms 2.4±0.00ms 0.00%
Array creation (Full) 2.7±0.00ms 2.7±0.00ms 0.00%
Array pop (Execution) 770.7±2.23µs 784.5±2.14µs -1.76%
Array pop (Full) 1200.6±1.37µs 1201.9±1.52µs -0.11%
Boolean Object Access (Execution) 4.4±0.02µs 4.4±0.01µs 0.00%
Boolean Object Access (Full) 226.4±0.44µs 213.1±2.37µs +6.24%
Clean js (Execution) 569.4±2.78µs 570.3±2.98µs -0.16%
Clean js (Full) 825.9±3.85µs 824.8±6.94µs +0.13%
Clean js (Parser) 35.3±0.08µs 34.9±0.06µs +1.15%
Create Realm 395.6±0.47ns 400.5±1.30ns -1.22%
Dynamic Object Property Access (Execution) 4.3±0.01µs 4.3±0.01µs 0.00%
Dynamic Object Property Access (Full) 225.6±3.83µs 215.7±2.30µs +4.59%
Expression (Parser) 5.8±0.00µs 5.8±0.00µs 0.00%
Fibonacci (Execution) 727.9±3.25µs 721.8±1.67µs +0.85%
Fibonacci (Full) 959.7±1.21µs 954.7±2.19µs +0.52%
For loop (Execution) 19.5±0.10µs 19.0±0.04µs +2.63%
For loop (Full) 244.4±1.02µs 231.8±0.27µs +5.44%
For loop (Parser) 16.7±0.09µs 16.5±0.09µs +1.21%
Goal Symbols (Parser) 11.8±0.02µs 11.6±0.03µs +1.72%
Hello World (Parser) 3.1±0.01µs 3.1±0.02µs 0.00%
Long file (Parser) 719.3±0.97ns 720.7±0.58ns -0.19%
Mini js (Execution) 514.6±3.88µs 509.0±3.32µs +1.10%
Mini js (Full) 762.8±3.13µs 748.7±2.53µs +1.88%
Mini js (Parser) 31.2±0.07µs 30.7±0.07µs +1.63%
Number Object Access (Execution) 3.5±0.01µs 3.4±0.00µs +2.94%
Number Object Access (Full) 220.1±0.26µs 210.4±0.51µs +4.61%
Object Creation (Execution) 3.6±0.01µs 3.6±0.01µs 0.00%
Object Creation (Full) 221.8±0.23µs 208.8±0.34µs +6.23%
RegExp (Execution) 8.1±0.02µs 8.0±0.03µs +1.25%
RegExp (Full) 229.1±0.42µs 216.9±0.56µs +5.62%
RegExp Literal (Execution) 9.3±0.03µs 9.2±0.04µs +1.09%
RegExp Literal (Full) 234.0±0.33µs 218.7±0.22µs +7.00%
RegExp Literal Creation (Execution) 8.0±0.04µs 8.0±0.03µs 0.00%
RegExp Literal Creation (Full) 225.7±1.40µs 212.2±0.44µs +6.36%
Static Object Property Access (Execution) 3.9±0.01µs 3.9±0.01µs 0.00%
Static Object Property Access (Full) 223.1±4.41µs 211.4±0.45µs +5.53%
String Object Access (Execution) 6.2±0.02µs 5.9±0.01µs +5.08%
String Object Access (Full) 227.0±1.24µs 217.0±0.59µs +4.61%
String comparison (Execution) 5.6±0.02µs 5.6±0.02µs 0.00%
String comparison (Full) 226.4±0.31µs 213.6±0.41µs +5.99%
String concatenation (Execution) 4.5±0.01µs 4.5±0.01µs 0.00%
String concatenation (Full) 221.7±0.46µs 207.6±0.23µs +6.79%
String copy (Execution) 3.4±0.01µs 3.3±0.01µs +3.03%
String copy (Full) 213.2±0.63µs 205.2±0.25µs +3.90%
Symbols (Execution) 2.9±0.02µs 2.8±0.01µs +3.57%
Symbols (Full) 209.4±0.44µs 198.7±0.47µs +5.39%

@github-actions
Copy link

github-actions bot commented Feb 6, 2021

Benchmark for 75806b3

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 362.2±2.78ns 361.0±3.86ns +0.33%
Arithmetic operations (Full) 250.4±1.49µs 234.9±2.08µs +6.60%
Array access (Execution) 6.2±0.05µs 6.4±0.03µs -3.13%
Array access (Full) 273.8±2.19µs 257.7±1.85µs +6.25%
Array creation (Execution) 3.2±0.07ms 2.9±0.03ms +10.34%
Array creation (Full) 3.2±0.03ms 3.3±0.02ms -3.03%
Array pop (Execution) 1001.8±8.83µs 940.1±6.71µs +6.56%
Array pop (Full) 1422.5±13.73µs 1443.2±5.98µs -1.43%
Boolean Object Access (Execution) 5.3±0.04µs 5.2±0.05µs +1.92%
Boolean Object Access (Full) 269.7±2.59µs 253.9±0.76µs +6.22%
Clean js (Execution) 686.9±6.51µs 678.6±5.32µs +1.22%
Clean js (Full) 997.6±8.57µs 987.1±13.20µs +1.06%
Clean js (Parser) 40.6±0.36µs 40.4±0.24µs +0.50%
Create Realm 459.3±3.84ns 466.8±4.13ns -1.61%
Dynamic Object Property Access (Execution) 5.1±0.03µs 5.1±0.04µs 0.00%
Dynamic Object Property Access (Full) 271.5±1.25µs 252.7±3.03µs +7.44%
Expression (Parser) 7.2±0.03µs 6.8±0.06µs +5.88%
Fibonacci (Execution) 860.9±5.39µs 841.1±5.39µs +2.35%
Fibonacci (Full) 1138.9±4.57µs 1133.5±9.04µs +0.48%
For loop (Execution) 23.0±0.17µs 22.7±0.21µs +1.32%
For loop (Full) 295.7±0.88µs 276.7±2.90µs +6.87%
For loop (Parser) 19.1±0.13µs 18.3±0.83µs +4.37%
Goal Symbols (Parser) 13.5±0.26µs 13.7±0.07µs -1.46%
Hello World (Parser) 3.6±0.01µs 3.6±0.03µs 0.00%
Long file (Parser) 798.7±6.72ns 797.2±6.68ns +0.19%
Mini js (Execution) 614.3±5.50µs 608.5±6.42µs +0.95%
Mini js (Full) 911.9±4.85µs 897.1±8.14µs +1.65%
Mini js (Parser) 35.6±0.39µs 35.8±0.22µs -0.56%
Number Object Access (Execution) 4.2±0.02µs 4.1±0.04µs +2.44%
Number Object Access (Full) 265.0±2.59µs 248.1±2.92µs +6.81%
Object Creation (Execution) 4.3±0.01µs 4.3±0.03µs 0.00%
Object Creation (Full) 265.0±4.34µs 249.2±1.83µs +6.34%
RegExp (Execution) 9.6±0.04µs 9.5±0.07µs +1.05%
RegExp (Full) 273.0±4.70µs 256.1±3.73µs +6.60%
RegExp Literal (Execution) 11.1±0.07µs 11.0±0.07µs +0.91%
RegExp Literal (Full) 280.0±3.74µs 262.1±1.95µs +6.83%
RegExp Literal Creation (Execution) 9.5±0.06µs 9.4±0.07µs +1.06%
RegExp Literal Creation (Full) 271.6±2.79µs 254.4±2.10µs +6.76%
Static Object Property Access (Execution) 4.6±0.03µs 4.6±0.04µs 0.00%
Static Object Property Access (Full) 270.3±2.64µs 249.7±2.01µs +8.25%
String Object Access (Execution) 7.2±0.04µs 7.1±0.06µs +1.41%
String Object Access (Full) 272.6±2.41µs 256.4±3.17µs +6.32%
String comparison (Execution) 6.8±0.04µs 6.7±0.04µs +1.49%
String comparison (Full) 272.3±1.68µs 256.8±1.96µs +6.04%
String concatenation (Execution) 5.4±0.04µs 5.3±0.03µs +1.89%
String concatenation (Full) 264.6±2.32µs 247.1±2.27µs +7.08%
String copy (Execution) 4.0±0.02µs 4.1±0.02µs -2.44%
String copy (Full) 260.9±2.03µs 244.1±2.27µs +6.88%
Symbols (Execution) 3.4±0.03µs 3.4±0.03µs 0.00%
Symbols (Full) 252.4±2.30µs 239.0±2.05µs +5.61%

@github-actions
Copy link

github-actions bot commented Feb 7, 2021

Benchmark for 93823cb

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 327.2±23.77ns 329.1±26.81ns -0.58%
Arithmetic operations (Full) 239.8±13.53µs 222.6±13.18µs +7.73%
Array access (Execution) 6.3±0.50µs 6.2±0.50µs +1.61%
Array access (Full) 285.9±25.44µs 244.4±17.95µs +16.98%
Array creation (Execution) 2.5±0.16ms 2.4±0.15ms +4.17%
Array creation (Full) 2.7±0.16ms 2.8±0.20ms -3.57%
Array pop (Execution) 760.7±43.76µs 773.8±48.33µs -1.69%
Array pop (Full) 1233.4±209.64µs 1215.8±83.88µs +1.45%
Boolean Object Access (Execution) 4.9±0.37µs 4.7±0.27µs +4.26%
Boolean Object Access (Full) 249.9±17.03µs 237.0±14.76µs +5.44%
Clean js (Execution) 614.1±47.54µs 617.6±47.34µs -0.57%
Clean js (Full) 918.1±72.91µs 909.4±95.95µs +0.96%
Clean js (Parser) 36.3±2.25µs 36.5±2.66µs -0.55%
Create Realm 409.0±57.29ns 394.1±38.31ns +3.78%
Dynamic Object Property Access (Execution) 5.1±0.44µs 5.0±0.46µs +2.00%
Dynamic Object Property Access (Full) 265.8±17.05µs 259.4±19.07µs +2.47%
Expression (Parser) 5.9±0.48µs 6.1±0.49µs -3.28%
Fibonacci (Execution) 884.6±68.42µs 845.4±55.60µs +4.64%
Fibonacci (Full) 1124.3±78.46µs 1113.4±70.63µs +0.98%
For loop (Execution) 21.7±1.47µs 21.6±1.50µs +0.46%
For loop (Full) 278.8±21.47µs 257.1±20.07µs +8.44%
For loop (Parser) 17.6±1.65µs 17.5±1.48µs +0.57%
Goal Symbols (Parser) 11.6±0.73µs 12.2±0.94µs -4.92%
Hello World (Parser) 3.2±0.21µs 3.2±0.22µs 0.00%
Long file (Parser) 699.9±55.47ns 706.1±65.76ns -0.88%
Mini js (Execution) 545.8±38.94µs 547.3±46.17µs -0.27%
Mini js (Full) 805.3±52.50µs 795.6±46.43µs +1.22%
Mini js (Parser) 33.8±2.70µs 31.8±2.33µs +6.29%
Number Object Access (Execution) 3.9±0.36µs 3.8±0.34µs +2.63%
Number Object Access (Full) 256.5±17.66µs 244.5±12.49µs +4.91%
Object Creation (Execution) 4.4±0.32µs 4.6±0.32µs -4.35%
Object Creation (Full) 257.8±24.96µs 246.6±17.38µs +4.54%
RegExp (Execution) 8.8±0.68µs 8.8±0.61µs 0.00%
RegExp (Full) 264.5±16.09µs 249.0±17.10µs +6.22%
RegExp Literal (Execution) 10.0±0.70µs 10.5±0.93µs -4.76%
RegExp Literal (Full) 272.4±20.01µs 256.0±24.59µs +6.41%
RegExp Literal Creation (Execution) 8.9±0.72µs 9.1±0.97µs -2.20%
RegExp Literal Creation (Full) 259.4±17.13µs 247.7±18.49µs +4.72%
Static Object Property Access (Execution) 4.6±0.34µs 4.6±0.28µs 0.00%
Static Object Property Access (Full) 256.1±12.26µs 252.9±22.65µs +1.27%
String Object Access (Execution) 6.8±0.61µs 6.5±0.50µs +4.62%
String Object Access (Full) 261.7±21.40µs 245.1±17.13µs +6.77%
String comparison (Execution) 6.5±0.52µs 6.2±0.44µs +4.84%
String comparison (Full) 263.2±19.88µs 242.9±17.98µs +8.36%
String concatenation (Execution) 5.2±0.36µs 5.1±0.36µs +1.96%
String concatenation (Full) 254.0±16.69µs 252.4±19.36µs +0.63%
String copy (Execution) 3.8±0.33µs 4.0±0.33µs -5.00%
String copy (Full) 247.0±16.41µs 231.9±13.44µs +6.51%
Symbols (Execution) 3.2±0.24µs 3.5±0.23µs -8.57%
Symbols (Full) 234.0±14.45µs 225.1±15.10µs +3.95%

boa/src/builtins/set/set_iterator.rs Outdated Show resolved Hide resolved
boa/src/builtins/set/set_iterator.rs Outdated Show resolved Hide resolved
@RageKnify RageKnify added the blocked Waiting for another code change label Feb 16, 2021
@github-actions
Copy link

Benchmark for 209e32a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 367.1±0.66ns 359.0±1.58ns +2.26%
Arithmetic operations (Full) 251.6±1.83µs 232.5±0.62µs +8.22%
Array access (Execution) 6.1±0.11µs 6.2±0.04µs -1.61%
Array access (Full) 269.0±4.06µs 255.2±4.09µs +5.41%
Array creation (Execution) 2.9±0.03ms 3.0±0.10ms -3.33%
Array creation (Full) 3.2±0.01ms 3.3±0.01ms -3.03%
Array pop (Execution) 938.3±11.38µs 967.9±4.88µs -3.06%
Array pop (Full) 1439.4±11.74µs 1412.7±10.39µs +1.89%
Boolean Object Access (Execution) 5.3±0.03µs 5.2±0.01µs +1.92%
Boolean Object Access (Full) 269.2±0.88µs 254.3±1.22µs +5.86%
Clean js (Execution) 689.5±3.65µs 678.5±7.44µs +1.62%
Clean js (Full) 986.7±10.24µs 980.2±11.96µs +0.66%
Clean js (Parser) 43.6±0.31µs 43.6±0.11µs 0.00%
Create Realm 478.4±9.78ns 471.1±6.68ns +1.55%
Dynamic Object Property Access (Execution) 5.0±0.06µs 5.1±0.02µs -1.96%
Dynamic Object Property Access (Full) 267.3±2.67µs 250.8±1.37µs +6.58%
Expression (Parser) 7.1±0.03µs 7.1±0.06µs 0.00%
Fibonacci (Execution) 847.5±14.84µs 843.0±2.52µs +0.53%
Fibonacci (Full) 1114.0±14.90µs 1138.6±4.43µs -2.16%
For loop (Execution) 23.0±0.34µs 22.9±0.09µs +0.44%
For loop (Full) 288.6±5.50µs 274.0±0.92µs +5.33%
For loop (Parser) 20.6±0.11µs 20.8±1.27µs -0.96%
Goal Symbols (Parser) 14.6±0.09µs 14.5±0.10µs +0.69%
Hello World (Parser) 4.0±0.02µs 3.9±0.01µs +2.56%
Long file (Parser) 795.3±3.41ns 796.0±15.70ns -0.09%
Mini js (Execution) 606.3±12.05µs 612.4±5.10µs -1.00%
Mini js (Full) 911.6±5.29µs 892.2±3.44µs +2.17%
Mini js (Parser) 38.0±0.58µs 38.3±0.12µs -0.78%
Number Object Access (Execution) 4.2±0.02µs 4.1±0.04µs +2.44%
Number Object Access (Full) 263.2±1.01µs 245.6±1.31µs +7.17%
Object Creation (Execution) 4.2±0.07µs 4.3±0.02µs -2.33%
Object Creation (Full) 266.9±1.82µs 246.4±1.33µs +8.32%
RegExp (Execution) 10.8±0.02µs 11.1±0.08µs -2.70%
RegExp (Full) 268.6±4.47µs 255.6±1.70µs +5.09%
RegExp Literal (Execution) 10.8±0.03µs 11.2±0.08µs -3.57%
RegExp Literal (Full) 276.4±0.98µs 258.9±2.81µs +6.76%
RegExp Literal Creation (Execution) 9.3±0.03µs 9.7±0.04µs -4.12%
RegExp Literal Creation (Full) 266.6±3.76µs 252.7±3.84µs +5.50%
Static Object Property Access (Execution) 4.6±0.05µs 4.6±0.02µs 0.00%
Static Object Property Access (Full) 264.3±3.11µs 251.0±0.99µs +5.30%
String Object Access (Execution) 7.3±0.03µs 7.2±0.04µs +1.39%
String Object Access (Full) 272.0±0.82µs 256.8±2.04µs +5.92%
String comparison (Execution) 6.7±0.03µs 6.6±0.10µs +1.52%
String comparison (Full) 273.0±2.74µs 252.1±1.35µs +8.29%
String concatenation (Execution) 5.3±0.03µs 5.2±0.02µs +1.92%
String concatenation (Full) 266.6±0.96µs 244.8±1.39µs +8.91%
String copy (Execution) 4.0±0.01µs 4.0±0.02µs 0.00%
String copy (Full) 255.5±4.86µs 239.6±1.09µs +6.64%
Symbols (Execution) 3.3±0.04µs 3.4±0.02µs -2.94%
Symbols (Full) 248.5±2.10µs 234.6±0.90µs +5.92%

@github-actions
Copy link

Benchmark for 5d4c262

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 350.7±23.18ns 344.2±28.37ns +1.89%
Arithmetic operations (Full) 262.9±18.84µs 245.8±13.78µs +6.96%
Array access (Execution) 6.4±0.55µs 6.7±0.40µs -4.48%
Array access (Full) 284.7±18.05µs 262.7±18.52µs +8.37%
Array creation (Execution) 2.8±0.17ms 2.7±0.22ms +3.70%
Array creation (Full) 3.0±0.16ms 3.0±0.16ms 0.00%
Array pop (Execution) 892.7±53.60µs 887.5±53.82µs +0.59%
Array pop (Full) 1369.3±76.10µs 1348.0±119.67µs +1.58%
Boolean Object Access (Execution) 5.3±0.42µs 5.3±0.43µs 0.00%
Boolean Object Access (Full) 298.3±25.69µs 259.9±14.83µs +14.77%
Clean js (Execution) 672.5±45.28µs 659.5±41.15µs +1.97%
Clean js (Full) 976.0±72.39µs 957.8±52.04µs +1.90%
Clean js (Parser) 46.7±5.83µs 41.9±2.43µs +11.46%
Create Realm 443.5±31.43ns 458.8±32.32ns -3.33%
Dynamic Object Property Access (Execution) 5.3±0.33µs 5.6±0.65µs -5.36%
Dynamic Object Property Access (Full) 285.3±20.75µs 273.9±29.48µs +4.16%
Expression (Parser) 7.1±0.65µs 6.5±0.56µs +9.23%
Fibonacci (Execution) 925.1±54.51µs 921.0±35.62µs +0.45%
Fibonacci (Full) 1247.0±110.66µs 1190.1±79.90µs +4.78%
For loop (Execution) 24.0±1.80µs 24.3±1.80µs -1.23%
For loop (Full) 300.5±16.73µs 280.5±18.60µs +7.13%
For loop (Parser) 20.0±1.05µs 20.2±1.86µs -0.99%
Goal Symbols (Parser) 14.3±1.14µs 14.3±0.96µs 0.00%
Hello World (Parser) 3.7±0.23µs 3.8±0.27µs -2.63%
Long file (Parser) 759.8±70.78ns 759.1±45.37ns +0.09%
Mini js (Execution) 603.3±35.63µs 585.7±35.74µs +3.00%
Mini js (Full) 893.5±53.83µs 886.5±53.51µs +0.79%
Mini js (Parser) 37.8±2.74µs 38.7±2.94µs -2.33%
Number Object Access (Execution) 4.2±0.32µs 4.0±0.22µs +5.00%
Number Object Access (Full) 285.1±19.31µs 259.3±22.08µs +9.95%
Object Creation (Execution) 4.5±0.39µs 4.6±0.26µs -2.17%
Object Creation (Full) 283.3±19.87µs 252.4±12.99µs +12.24%
RegExp (Execution) 11.2±1.82µs 11.2±0.83µs 0.00%
RegExp (Full) 286.5±15.54µs 268.0±17.72µs +6.90%
RegExp Literal (Execution) 11.2±1.03µs 11.2±0.83µs 0.00%
RegExp Literal (Full) 295.9±20.25µs 263.8±15.94µs +12.17%
RegExp Literal Creation (Execution) 10.0±0.80µs 10.0±0.90µs 0.00%
RegExp Literal Creation (Full) 279.0±14.12µs 264.6±14.79µs +5.44%
Static Object Property Access (Execution) 5.2±0.30µs 4.9±0.36µs +6.12%
Static Object Property Access (Full) 279.7±18.86µs 260.5±17.96µs +7.37%
String Object Access (Execution) 7.5±0.48µs 8.0±0.21µs -6.25%
String Object Access (Full) 291.3±28.24µs 265.9±17.24µs +9.55%
String comparison (Execution) 6.7±0.39µs 6.5±0.45µs +3.08%
String comparison (Full) 292.5±25.76µs 262.6±25.65µs +11.39%
String concatenation (Execution) 5.6±0.36µs 5.4±0.37µs +3.70%
String concatenation (Full) 280.5±17.16µs 257.7±14.63µs +8.85%
String copy (Execution) 4.2±0.25µs 4.1±0.45µs +2.44%
String copy (Full) 269.1±20.43µs 250.8±18.18µs +7.30%
Symbols (Execution) 3.5±0.26µs 3.9±0.30µs -10.26%
Symbols (Full) 254.2±15.74µs 250.4±17.45µs +1.52%

@HalidOdat HalidOdat added enhancement New feature or request and removed blocked Waiting for another code change labels Feb 16, 2021
Includes change to Value::hash so that 1i32 == 1f64

closes #400, blocked by #1109
- Fix Map.length
- Fix msg for invoking Map without new
- Simplify calculation of map size when displaying Maps
RageKnify and others added 2 commits February 16, 2021 20:05
- Introduce IteratorClose
- Fix a few errors in Set covered by test262
- Fix switch of PropertyDescriptor kind
- Fix deletion of accessor properties (UnaryOp change)
- Fix symbol equality
@RageKnify RageKnify added enhancement New feature or request and removed enhancement New feature or request labels Feb 16, 2021
@github-actions
Copy link

Benchmark for 7af5f9e

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 370.2±19.57ns 393.0±15.24ns -5.80%
Arithmetic operations (Full) 280.3±13.98µs 255.5±13.14µs +9.71%
Array access (Execution) 7.2±0.26µs 7.0±0.27µs +2.86%
Array access (Full) 333.2±12.22µs 294.2±10.08µs +13.26%
Array creation (Execution) 3.0±0.13ms 3.0±0.10ms 0.00%
Array creation (Full) 3.5±0.12ms 3.3±0.10ms +6.06%
Array pop (Execution) 954.7±30.26µs 942.7±43.53µs +1.27%
Array pop (Full) 1475.4±61.67µs 1495.7±71.77µs -1.36%
Boolean Object Access (Execution) 5.9±0.29µs 5.6±0.29µs +5.36%
Boolean Object Access (Full) 304.5±16.65µs 280.7±15.49µs +8.48%
Clean js (Execution) 733.9±33.19µs 733.6±32.77µs +0.04%
Clean js (Full) 1059.1±35.25µs 1001.0±52.48µs +5.80%
Clean js (Parser) 48.7±1.84µs 46.0±1.77µs +5.87%
Create Realm 487.0±20.12ns 507.9±18.24ns -4.11%
Dynamic Object Property Access (Execution) 6.1±0.31µs 5.9±0.26µs +3.39%
Dynamic Object Property Access (Full) 311.0±10.32µs 280.1±11.98µs +11.03%
Expression (Parser) 7.3±0.32µs 7.6±0.36µs -3.95%
Fibonacci (Execution) 1025.8±47.34µs 1008.5±39.48µs +1.72%
Fibonacci (Full) 1340.5±39.45µs 1310.2±45.43µs +2.31%
For loop (Execution) 26.4±1.03µs 25.6±1.40µs +3.12%
For loop (Full) 336.8±12.62µs 312.6±20.41µs +7.74%
For loop (Parser) 22.6±1.10µs 20.8±1.22µs +8.65%
Goal Symbols (Parser) 15.4±0.71µs 14.8±0.70µs +4.05%
Hello World (Parser) 4.1±0.21µs 3.9±0.27µs +5.13%
Long file (Parser) 826.8±33.79ns 818.5±41.27ns +1.01%
Mini js (Execution) 646.6±27.29µs 640.7±23.71µs +0.92%
Mini js (Full) 979.5±60.90µs 931.9±38.07µs +5.11%
Mini js (Parser) 42.1±1.78µs 40.3±1.83µs +4.47%
Number Object Access (Execution) 4.6±0.26µs 4.4±0.22µs +4.55%
Number Object Access (Full) 306.8±13.78µs 263.2±13.12µs +16.57%
Object Creation (Execution) 5.0±0.29µs 5.0±0.20µs 0.00%
Object Creation (Full) 310.8±8.41µs 283.2±28.66µs +9.75%
RegExp (Execution) 12.4±0.36µs 11.9±1.04µs +4.20%
RegExp (Full) 313.2±21.88µs 294.2±19.92µs +6.46%
RegExp Literal (Execution) 12.4±0.33µs 12.4±0.96µs 0.00%
RegExp Literal (Full) 312.5±12.68µs 280.2±12.60µs +11.53%
RegExp Literal Creation (Execution) 10.6±0.27µs 10.6±0.32µs 0.00%
RegExp Literal Creation (Full) 303.1±11.30µs 278.7±12.40µs +8.75%
Static Object Property Access (Execution) 5.3±0.32µs 5.8±0.22µs -8.62%
Static Object Property Access (Full) 305.8±14.88µs 279.1±14.16µs +9.57%
String Object Access (Execution) 8.5±0.43µs 7.7±0.39µs +10.39%
String Object Access (Full) 306.8±11.87µs 279.0±11.54µs +9.96%
String comparison (Execution) 7.4±0.46µs 7.3±0.22µs +1.37%
String comparison (Full) 308.9±10.32µs 273.0±14.40µs +13.15%
String concatenation (Execution) 6.2±0.26µs 6.0±0.30µs +3.33%
String concatenation (Full) 304.5±9.85µs 267.0±13.66µs +14.04%
String copy (Execution) 4.6±0.22µs 4.6±0.34µs 0.00%
String copy (Full) 299.1±12.81µs 259.2±15.09µs +15.39%
Symbols (Execution) 3.9±0.14µs 3.9±0.18µs 0.00%
Symbols (Full) 288.3±15.69µs 269.8±9.17µs +6.86%

@github-actions
Copy link

Benchmark for 3c6d330

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 368.3±11.12ns 391.6±16.27ns -5.95%
Arithmetic operations (Full) 290.3±11.01µs 258.4±9.63µs +12.35%
Array access (Execution) 7.0±0.31µs 7.1±0.28µs -1.41%
Array access (Full) 304.0±18.48µs 289.2±11.38µs +5.12%
Array creation (Execution) 2.9±0.12ms 3.0±0.16ms -3.33%
Array creation (Full) 3.3±0.14ms 3.2±0.11ms +3.13%
Array pop (Execution) 931.0±33.33µs 931.5±36.42µs -0.05%
Array pop (Full) 1472.2±43.59µs 1457.2±128.92µs +1.03%
Boolean Object Access (Execution) 5.8±0.46µs 5.5±0.43µs +5.45%
Boolean Object Access (Full) 294.4±12.03µs 282.8±8.59µs +4.10%
Clean js (Execution) 725.1±39.10µs 732.3±29.33µs -0.98%
Clean js (Full) 1046.5±49.73µs 1037.5±47.36µs +0.87%
Clean js (Parser) 46.7±1.89µs 47.0±1.69µs -0.64%
Create Realm 516.2±26.64ns 495.5±97.37ns +4.18%
Dynamic Object Property Access (Execution) 5.6±0.21µs 6.0±0.25µs -6.67%
Dynamic Object Property Access (Full) 298.8±10.21µs 283.5±12.50µs +5.40%
Expression (Parser) 7.2±0.34µs 7.2±0.35µs 0.00%
Fibonacci (Execution) 989.0±41.77µs 1003.7±32.22µs -1.46%
Fibonacci (Full) 1261.2±42.44µs 1323.4±58.47µs -4.70%
For loop (Execution) 26.0±1.23µs 25.9±1.41µs +0.39%
For loop (Full) 320.4±12.88µs 310.8±10.42µs +3.09%
For loop (Parser) 21.8±0.78µs 22.6±1.22µs -3.54%
Goal Symbols (Parser) 15.0±0.61µs 15.7±1.16µs -4.46%
Hello World (Parser) 4.0±0.20µs 4.2±0.20µs -4.76%
Long file (Parser) 787.4±38.38ns 803.8±36.92ns -2.04%
Mini js (Execution) 631.6±23.99µs 647.4±20.87µs -2.44%
Mini js (Full) 957.6±28.85µs 927.5±28.77µs +3.25%
Mini js (Parser) 42.0±1.96µs 42.2±1.00µs -0.47%
Number Object Access (Execution) 4.5±0.22µs 4.2±0.21µs +7.14%
Number Object Access (Full) 297.8±13.38µs 280.3±8.45µs +6.24%
Object Creation (Execution) 4.9±0.18µs 5.1±0.26µs -3.92%
Object Creation (Full) 291.0±12.80µs 283.2±14.47µs +2.75%
RegExp (Execution) 12.0±1.56µs 12.1±0.55µs -0.83%
RegExp (Full) 311.2±11.73µs 295.7±9.57µs +5.24%
RegExp Literal (Execution) 12.0±0.58µs 12.2±0.42µs -1.64%
RegExp Literal (Full) 317.6±21.13µs 286.0±11.60µs +11.05%
RegExp Literal Creation (Execution) 10.4±0.66µs 10.5±0.51µs -0.95%
RegExp Literal Creation (Full) 301.7±11.49µs 283.6±12.52µs +6.38%
Static Object Property Access (Execution) 5.1±0.40µs 5.4±0.25µs -5.56%
Static Object Property Access (Full) 294.3±11.70µs 278.2±10.41µs +5.79%
String Object Access (Execution) 8.0±0.23µs 7.7±0.34µs +3.90%
String Object Access (Full) 304.3±9.95µs 292.3±17.86µs +4.11%
String comparison (Execution) 7.0±0.32µs 7.2±0.37µs -2.78%
String comparison (Full) 307.6±13.35µs 284.7±10.37µs +8.04%
String concatenation (Execution) 5.8±0.21µs 6.0±0.24µs -3.33%
String concatenation (Full) 286.5±9.99µs 279.8±9.89µs +2.39%
String copy (Execution) 4.4±0.28µs 4.5±0.24µs -2.22%
String copy (Full) 299.5±14.00µs 270.4±8.15µs +10.76%
Symbols (Execution) 3.8±0.15µs 4.2±0.18µs -9.52%
Symbols (Full) 280.1±9.01µs 264.9±11.90µs +5.74%

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Looks very good!! I added some suggestions, but it's good to go from my side :) congrats!

boa/src/builtins/map/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/set/ordered_set.rs Show resolved Hide resolved
boa/src/builtins/set/ordered_set.rs Show resolved Hide resolved
boa/src/builtins/set/set_iterator.rs Show resolved Hide resolved
@Razican Razican requested a review from HalidOdat May 10, 2021 14:38
@github-actions
Copy link

Benchmark for 77451b1

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 338.8±12.46ns 356.3±3.18ns -4.91%
Arithmetic operations (Full) 273.3±13.94µs 258.8±3.79µs +5.60%
Array access (Execution) 5.8±0.15µs 6.1±0.43µs -4.92%
Array access (Full) 279.2±6.95µs 277.5±9.32µs +0.61%
Array creation (Execution) 2.7±0.06ms 2.9±0.04ms -6.90%
Array creation (Full) 3.1±0.06ms 3.1±0.04ms 0.00%
Array pop (Execution) 856.2±31.09µs 924.1±9.77µs -7.35%
Array pop (Full) 1340.2±45.98µs 1385.1±18.85µs -3.24%
Boolean Object Access (Execution) 5.2±0.27µs 5.1±0.07µs +1.96%
Boolean Object Access (Full) 283.6±3.78µs 274.4±3.98µs +3.35%
Clean js (Execution) 623.4±20.05µs 632.6±12.66µs -1.45%
Clean js (Full) 955.1±10.78µs 934.4±17.13µs +2.22%
Clean js (Parser) 39.2±0.86µs 39.6±0.61µs -1.01%
Create Realm 403.2±11.63ns 426.2±12.24ns -5.40%
Dynamic Object Property Access (Execution) 4.9±0.13µs 4.9±0.07µs 0.00%
Dynamic Object Property Access (Full) 282.4±6.20µs 273.7±3.78µs +3.18%
Expression (Parser) 6.7±0.17µs 6.6±0.11µs +1.52%
Fibonacci (Execution) 703.9±21.63µs 735.5±13.37µs -4.30%
Fibonacci (Full) 1014.3±32.33µs 1001.8±20.00µs +1.25%
For loop (Execution) 20.4±0.96µs 21.9±0.91µs -6.85%
For loop (Full) 289.3±11.99µs 296.2±2.27µs -2.33%
For loop (Parser) 19.1±0.26µs 19.0±0.40µs +0.53%
Goal Symbols (Parser) 13.3±0.20µs 13.3±0.16µs 0.00%
Hello World (Parser) 3.7±0.06µs 3.7±0.07µs 0.00%
Long file (Parser) 784.6±51.02ns 758.3±16.01ns +3.47%
Mini js (Execution) 561.5±17.28µs 584.3±6.70µs -3.90%
Mini js (Full) 885.5±13.21µs 883.3±9.37µs +0.25%
Mini js (Parser) 34.7±0.89µs 34.8±0.60µs -0.29%
Number Object Access (Execution) 3.9±0.15µs 4.0±0.08µs -2.50%
Number Object Access (Full) 279.3±3.10µs 266.0±5.37µs +5.00%
Object Creation (Execution) 4.3±0.21µs 4.1±0.09µs +4.88%
Object Creation (Full) 268.2±10.87µs 264.8±6.92µs +1.28%
RegExp (Execution) 10.5±0.35µs 11.6±0.15µs -9.48%
RegExp (Full) 276.9±11.59µs 281.1±4.43µs -1.49%
RegExp Literal (Execution) 10.4±0.22µs 11.5±0.22µs -9.57%
RegExp Literal (Full) 286.7±8.23µs 282.1±4.92µs +1.63%
RegExp Literal Creation (Execution) 8.9±0.33µs 10.1±0.12µs -11.88%
RegExp Literal Creation (Full) 272.9±8.58µs 275.7±4.17µs -1.02%
Static Object Property Access (Execution) 4.5±0.06µs 4.4±0.10µs +2.27%
Static Object Property Access (Full) 275.2±7.23µs 266.9±5.45µs +3.11%
String Object Access (Execution) 6.8±0.24µs 7.1±0.10µs -4.23%
String Object Access (Full) 280.7±6.16µs 275.9±4.25µs +1.74%
String comparison (Execution) 6.3±0.13µs 6.5±0.10µs -3.08%
String comparison (Full) 280.7±5.02µs 280.3±2.79µs +0.14%
String concatenation (Execution) 4.9±0.15µs 5.3±0.17µs -7.55%
String concatenation (Full) 281.8±2.87µs 272.6±2.90µs +3.37%
String copy (Execution) 3.7±0.20µs 3.9±0.09µs -5.13%
String copy (Full) 270.3±4.51µs 263.5±5.26µs +2.58%
Symbols (Execution) 3.2±0.08µs 3.2±0.05µs 0.00%
Symbols (Full) 258.5±7.45µs 252.0±4.08µs +2.58%

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! Just some minor documentation things.

boa/src/builtins/set/mod.rs Show resolved Hide resolved
@Razican
Copy link
Member

Razican commented May 12, 2021

The build failure is due to changes in prettier. A re-base should fix it (if we want, if not, I'm happy to merge it with this failure)

@github-actions
Copy link

Benchmark for f0a4b60

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 364.9±2.00ns 357.1±2.76ns +2.18%
Arithmetic operations (Full) 269.6±1.29µs 253.7±2.04µs +6.27%
Array access (Execution) 6.3±0.26µs 6.1±0.02µs +3.28%
Array access (Full) 293.0±1.36µs 278.2±1.38µs +5.32%
Array creation (Execution) 2.7±0.01ms 3.1±0.02ms -12.90%
Array creation (Full) 3.1±0.02ms 3.3±0.02ms -6.06%
Array pop (Execution) 884.3±9.46µs 984.3±5.76µs -10.16%
Array pop (Full) 1368.6±8.57µs 1408.0±10.10µs -2.80%
Boolean Object Access (Execution) 5.2±0.02µs 5.3±0.03µs -1.89%
Boolean Object Access (Full) 288.8±3.08µs 274.6±1.13µs +5.17%
Clean js (Execution) 656.6±4.75µs 656.3±4.64µs +0.05%
Clean js (Full) 974.5±7.53µs 959.0±9.31µs +1.62%
Clean js (Parser) 40.6±0.19µs 39.9±0.23µs +1.75%
Create Realm 425.4±2.37ns 424.5±2.21ns +0.21%
Dynamic Object Property Access (Execution) 5.1±0.04µs 4.9±0.02µs +4.08%
Dynamic Object Property Access (Full) 293.1±19.56µs 274.1±1.83µs +6.93%
Expression (Parser) 6.7±0.04µs 6.7±0.02µs 0.00%
Fibonacci (Execution) 749.4±4.15µs 757.7±2.76µs -1.10%
Fibonacci (Full) 1059.9±5.56µs 1048.8±4.59µs +1.06%
For loop (Execution) 22.4±0.85µs 21.6±0.13µs +3.70%
For loop (Full) 311.2±16.41µs 292.6±2.26µs +6.36%
For loop (Parser) 19.5±0.14µs 19.5±0.08µs 0.00%
Goal Symbols (Parser) 13.6±0.07µs 13.6±0.06µs 0.00%
Hello World (Parser) 3.7±0.02µs 3.7±0.04µs 0.00%
Long file (Parser) 777.5±3.68ns 779.7±5.23ns -0.28%
Mini js (Execution) 588.0±4.86µs 594.7±4.35µs -1.13%
Mini js (Full) 910.1±8.05µs 893.1±5.41µs +1.90%
Mini js (Parser) 35.8±0.11µs 35.1±0.24µs +1.99%
Number Object Access (Execution) 4.0±0.02µs 4.2±0.03µs -4.76%
Number Object Access (Full) 284.4±1.14µs 267.0±1.83µs +6.52%
Object Creation (Execution) 4.3±0.02µs 4.2±0.03µs +2.38%
Object Creation (Full) 284.9±1.63µs 269.1±1.96µs +5.87%
RegExp (Execution) 11.0±0.07µs 11.7±0.10µs -5.98%
RegExp (Full) 295.1±3.19µs 278.0±1.42µs +6.15%
RegExp Literal (Execution) 11.0±0.08µs 12.4±0.78µs -11.29%
RegExp Literal (Full) 300.1±1.60µs 281.5±2.34µs +6.61%
RegExp Literal Creation (Execution) 9.4±0.10µs 10.3±0.05µs -8.74%
RegExp Literal Creation (Full) 291.6±2.45µs 275.0±2.53µs +6.04%
Static Object Property Access (Execution) 4.6±0.15µs 4.4±0.04µs +4.55%
Static Object Property Access (Full) 286.8±0.80µs 272.0±3.28µs +5.44%
String Object Access (Execution) 7.2±0.07µs 7.7±0.57µs -6.49%
String Object Access (Full) 293.0±1.97µs 278.2±0.98µs +5.32%
String comparison (Execution) 6.6±0.04µs 6.5±0.03µs +1.54%
String comparison (Full) 293.0±1.23µs 273.4±2.29µs +7.17%
String concatenation (Execution) 5.2±0.04µs 5.2±0.04µs 0.00%
String concatenation (Full) 287.7±1.84µs 266.1±1.68µs +8.12%
String copy (Execution) 3.9±0.02µs 3.9±0.01µs 0.00%
String copy (Full) 279.4±0.78µs 262.0±1.58µs +6.64%
Symbols (Execution) 3.3±0.02µs 3.3±0.02µs 0.00%
Symbols (Full) 271.0±2.08µs 253.7±2.77µs +6.82%

RageKnify and others added 2 commits May 14, 2021 17:23
Speed up access to the prototype in the constructors

Co-Authored-By: HalidOdat <[email protected]>
@github-actions
Copy link

Benchmark for fb495bd

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 340.7±9.03ns 342.1±11.18ns -0.41%
Arithmetic operations (Full) 253.7±7.11µs 251.3±4.87µs +0.96%
Array access (Execution) 5.9±0.21µs 5.6±0.16µs +5.36%
Array access (Full) 279.5±6.92µs 268.7±5.10µs +4.02%
Array creation (Execution) 2.9±0.09ms 2.6±0.08ms +11.54%
Array creation (Full) 2.9±0.06ms 3.1±0.08ms -6.45%
Array pop (Execution) 914.4±23.38µs 851.4±24.49µs +7.40%
Array pop (Full) 1305.0±30.78µs 1313.0±41.17µs -0.61%
Boolean Object Access (Execution) 4.9±0.11µs 5.0±0.10µs -2.00%
Boolean Object Access (Full) 269.9±7.42µs 262.9±6.78µs +2.66%
Clean js (Execution) 647.8±17.32µs 612.7±15.88µs +5.73%
Clean js (Full) 922.0±32.48µs 935.3±16.08µs -1.42%
Clean js (Parser) 39.1±0.74µs 38.3±1.29µs +2.09%
Create Realm 396.7±12.48ns 395.8±12.22ns +0.23%
Dynamic Object Property Access (Execution) 4.7±0.23µs 4.8±0.08µs -2.08%
Dynamic Object Property Access (Full) 273.1±8.18µs 261.2±7.96µs +4.56%
Expression (Parser) 6.5±0.17µs 6.4±0.16µs +1.56%
Fibonacci (Execution) 703.2±18.45µs 706.3±21.30µs -0.44%
Fibonacci (Full) 1008.8±42.06µs 986.2±20.72µs +2.29%
For loop (Execution) 20.5±0.51µs 20.8±0.53µs -1.44%
For loop (Full) 289.6±10.02µs 279.2±8.02µs +3.72%
For loop (Parser) 18.6±0.42µs 19.1±0.41µs -2.62%
Goal Symbols (Parser) 12.9±0.39µs 12.9±0.35µs 0.00%
Hello World (Parser) 3.6±0.08µs 3.6±0.10µs 0.00%
Long file (Parser) 741.2±22.15ns 752.6±18.35ns -1.51%
Mini js (Execution) 559.6±13.99µs 547.5±17.83µs +2.21%
Mini js (Full) 858.0±25.28µs 868.7±16.05µs -1.23%
Mini js (Parser) 33.7±0.84µs 34.6±0.71µs -2.60%
Number Object Access (Execution) 3.9±0.08µs 3.9±0.08µs 0.00%
Number Object Access (Full) 270.5±4.77µs 260.1±7.20µs +4.00%
Object Creation (Execution) 4.1±0.09µs 4.0±0.08µs +2.50%
Object Creation (Full) 275.5±5.80µs 257.9±7.28µs +6.82%
RegExp (Execution) 11.3±0.30µs 10.0±0.25µs +13.00%
RegExp (Full) 270.8±11.11µs 265.1±7.13µs +2.15%
RegExp Literal (Execution) 11.4±0.24µs 10.5±0.25µs +8.57%
RegExp Literal (Full) 281.4±7.20µs 273.1±7.83µs +3.04%
RegExp Literal Creation (Execution) 10.0±0.21µs 9.2±0.32µs +8.70%
RegExp Literal Creation (Full) 275.1±7.31µs 264.8±8.83µs +3.89%
Static Object Property Access (Execution) 4.4±0.09µs 4.3±0.11µs +2.33%
Static Object Property Access (Full) 274.0±5.01µs 262.2±10.22µs +4.50%
String Object Access (Execution) 6.8±0.15µs 7.0±0.15µs -2.86%
String Object Access (Full) 279.6±5.76µs 268.8±6.62µs +4.02%
String comparison (Execution) 6.0±0.15µs 6.3±0.15µs -4.76%
String comparison (Full) 270.3±7.22µs 263.7±8.15µs +2.50%
String concatenation (Execution) 4.9±0.16µs 4.9±0.17µs 0.00%
String concatenation (Full) 270.5±8.59µs 255.4±7.86µs +5.91%
String copy (Execution) 3.8±0.11µs 3.7±0.07µs +2.70%
String copy (Full) 258.5±7.59µs 251.5±6.47µs +2.78%
Symbols (Execution) 3.2±0.13µs 3.1±0.09µs +3.23%
Symbols (Full) 254.7±7.39µs 242.2±7.45µs +5.16%

@RageKnify
Copy link
Contributor Author

The MacOS CI "failure" was just a problem on GHs side, tests have been working so far, no reason to expect them to fail now.

@Razican Razican merged commit c4460b7 into master May 20, 2021
@Razican Razican deleted the feat/set branch May 20, 2021 14:42
Razican pushed a commit that referenced this pull request May 22, 2021
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Set()
3 participants