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

Make same_value and same_value_zero static methods #1271

Merged
merged 1 commit into from
May 22, 2021

Conversation

HalidOdat
Copy link
Member

This makes the API much more intuitive.

It changes the following:

  • Make same_value a static method of Value
  • Make same_value_zero a static method of Value

@HalidOdat HalidOdat added this to the v0.12.0 milestone May 21, 2021
@HalidOdat HalidOdat requested review from RageKnify and Razican May 21, 2021 19:58
@github-actions
Copy link

Test262 conformance changes:

Test result master count PR count difference
Total 78,701 78,701 0
Passed 26,404 26,404 0
Ignored 15,519 15,519 0
Failed 36,778 36,778 0
Panics 27 26 -1
Conformance 33.55% 33.55% 0.00%

@github-actions
Copy link

Benchmark for 2300504

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 311.4±9.12ns 302.8±0.13ns +2.84%
Arithmetic operations (Full) 201.5±0.25µs 201.1±0.34µs +0.20%
Array access (Execution) 4.5±0.01µs 5.1±0.02µs -11.76%
Array access (Full) 248.5±0.46µs 220.3±0.64µs +12.80%
Array creation (Execution) 2.0±0.00ms 2.3±0.01ms -13.04%
Array creation (Full) 2.7±0.01ms 2.4±0.00ms +12.50%
Array pop (Execution) 651.7±2.51µs 741.2±2.56µs -12.08%
Array pop (Full) 1181.9±9.88µs 1185.6±3.00µs -0.31%
Boolean Object Access (Execution) 4.4±0.01µs 4.4±0.00µs 0.00%
Boolean Object Access (Full) 213.2±0.97µs 213.9±0.28µs -0.33%
Clean js (Execution) 555.8±4.08µs 493.0±4.21µs +12.74%
Clean js (Full) 732.7±2.72µs 730.9±2.91µs +0.25%
Clean js (Parser) 31.7±0.03µs 36.3±0.28µs -12.67%
Create Realm 358.9±0.20ns 320.4±2.80ns +12.02%
Dynamic Object Property Access (Execution) 4.3±0.01µs 4.2±0.01µs +2.38%
Dynamic Object Property Access (Full) 246.3±0.47µs 215.5±0.75µs +14.29%
Expression (Parser) 5.1±0.00µs 5.8±0.00µs -12.07%
Fibonacci (Execution) 569.3±1.51µs 636.6±1.33µs -10.57%
Fibonacci (Full) 904.5±3.66µs 804.2±6.08µs +12.47%
For loop (Execution) 18.4±0.03µs 18.7±0.10µs -1.60%
For loop (Full) 257.6±0.49µs 230.1±0.79µs +11.95%
For loop (Parser) 15.4±0.13µs 15.6±0.09µs -1.28%
Goal Symbols (Parser) 10.8±0.01µs 12.2±0.02µs -11.48%
Hello World (Parser) 3.0±0.01µs 3.0±0.01µs 0.00%
Long file (Parser) 689.9±7.15ns 707.7±13.22ns -2.52%
Mini js (Execution) 493.7±2.63µs 495.2±3.02µs -0.30%
Mini js (Full) 676.1±1.88µs 767.8±2.83µs -11.94%
Mini js (Parser) 27.9±0.07µs 31.8±0.04µs -12.26%
Number Object Access (Execution) 3.5±0.02µs 3.4±0.03µs +2.94%
Number Object Access (Full) 238.2±0.65µs 211.9±0.50µs +12.41%
Object Creation (Execution) 3.3±0.01µs 3.6±0.04µs -8.33%
Object Creation (Full) 245.4±0.74µs 212.2±0.60µs +15.65%
RegExp (Execution) 9.3±0.03µs 9.4±0.02µs -1.06%
RegExp (Full) 254.0±2.97µs 226.7±0.67µs +12.04%
RegExp Literal (Execution) 9.3±0.02µs 9.4±0.03µs -1.06%
RegExp Literal (Full) 252.7±0.67µs 222.7±1.25µs +13.47%
RegExp Literal Creation (Execution) 8.0±0.02µs 8.0±0.06µs 0.00%
RegExp Literal Creation (Full) 245.4±0.51µs 219.3±1.24µs +11.90%
Static Object Property Access (Execution) 3.4±0.01µs 3.8±0.02µs -10.53%
Static Object Property Access (Full) 244.0±0.55µs 213.2±0.66µs +14.45%
String Object Access (Execution) 6.2±0.05µs 6.3±0.01µs -1.59%
String Object Access (Full) 216.4±0.68µs 216.0±0.65µs +0.19%
String comparison (Execution) 5.5±0.01µs 5.6±0.01µs -1.79%
String comparison (Full) 244.9±3.78µs 215.9±1.98µs +13.43%
String concatenation (Execution) 4.4±0.02µs 4.4±0.02µs 0.00%
String concatenation (Full) 241.1±0.33µs 211.0±0.60µs +14.27%
String copy (Execution) 3.3±0.01µs 3.4±0.02µs -2.94%
String copy (Full) 234.2±1.78µs 206.6±0.48µs +13.36%
Symbols (Execution) 2.8±0.01µs 2.9±0.00µs -3.45%
Symbols (Full) 229.4±0.47µs 201.9±0.75µs +13.62%

@Razican Razican merged commit 0dcf182 into master May 22, 2021
@RageKnify RageKnify deleted the refactor/value-same-value-methods branch May 22, 2021 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants