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 BigInt.prototype[ @@toStringTag ] #1265

Merged
merged 1 commit into from
May 21, 2021

Conversation

n14little
Copy link
Contributor

This Pull Request fixes/closes #1230.

It changes the following:

  • Implements BigInt.prototype[ @@toStringTag ]

@n14little
Copy link
Contributor Author

Test262 conformance changes:

Test result master count PR count difference
Total 78,701 78,701 0
Passed 26,400 26,404 +4
Ignored 15,519 15,519 0
Failed 36,782 36,778 -4
Panics 26 26 0
Conformance 33.54% 33.55% +0.01%

@n14little
Copy link
Contributor Author

Benchmarks:

┌─────────┬──────────────────────────────────────────────┬──────────────────────┬──────────────────────┬────────────┐
│ (index) │                     name                     │   changesDuration    │    masterDuration    │ difference │
├─────────┼──────────────────────────────────────────────┼──────────────────────┼──────────────────────┼────────────┤
│    0    │     'Arithmetic operations (Execution)'      │ '**358.2±12.21ns**'  │   '360.5±14.49ns'    │  '-0.99'   │
│    1    │        'Arithmetic operations (Full)'        │ '**288.3±10.97µs**'  │   '294.3±27.24µs'    │   '-2.0'   │
│    2    │          'Array access (Execution)'          │     '6.6±0.22µs'     │   '**6.5±0.40µs**'   │   '+2.0'   │
│    3    │            'Array access (Full)'             │   '326.9±26.75µs'    │ '**321.9±26.22µs**'  │   '+2.0'   │
│    4    │         'Array creation (Execution)'         │   '**2.7±0.11ms**'   │     '2.8±0.21ms'     │   '-2.9'   │
│    5    │           'Array creation (Full)'            │   '**3.2±0.16ms**'   │     '3.3±0.41ms'     │  '-0.99'   │
│    6    │           'Array pop (Execution)'            │ '**853.8±32.12µs**'  │   '873.4±40.91µs'    │   '-2.0'   │
│    7    │              'Array pop (Full)'              │ '**1431.9±82.78µs**' │   '1453.5±75.04µs'   │   '-2.0'   │
│    8    │     'Boolean Object Access (Execution)'      │     '5.3±0.24µs'     │     '5.4±0.40µs'     │   '0.0'    │
│    9    │        'Boolean Object Access (Full)'        │   '312.1±10.74µs'    │   '312.0±23.63µs'    │   '0.0'    │
│   10    │            'Clean js (Execution)'            │   '680.1±27.99µs'    │   '680.7±16.34µs'    │   '0.0'    │
│   11    │              'Clean js (Full)'               │ '**1016.2±65.80µs**' │  '1034.2±119.14µs'   │   '-2.0'   │
│   12    │             'Clean js (Parser)'              │  '**43.6±1.57µs**'   │    '43.9±1.72µs'     │  '-0.99'   │
│   13    │                'Create Realm'                │   '421.7±29.24ns'    │ '**410.4±23.44ns**'  │   '+3.0'   │
│   14    │ 'Dynamic Object Property Access (Execution)' │   '**5.4±0.20µs**'   │     '5.4±0.27µs'     │  '-0.99'   │
│   15    │   'Dynamic Object Property Access (Full)'    │   '315.6±16.33µs'    │   '316.4±24.88µs'    │   '0.0'    │
│   16    │            'Expression (Parser)'             │     '7.0±0.31µs'     │   '**6.9±0.41µs**'   │   '+1.0'   │
│   17    │           'Fibonacci (Execution)'            │   '846.6±32.94µs'    │ '**826.9±37.92µs**'  │   '+2.0'   │
│   18    │              'Fibonacci (Full)'              │   '1191.1±66.17µs'   │ '**1184.9±70.60µs**' │   '+1.0'   │
│   19    │            'For loop (Execution)'            │    '23.1±0.90µs'     │  '**22.5±1.06µs**'   │   '+3.0'   │
│   20    │              'For loop (Full)'               │ '**328.5±12.31µs**'  │   '345.1±91.18µs'    │   '-4.8'   │
│   21    │             'For loop (Parser)'              │  '**20.7±0.86µs**'   │    '20.9±1.34µs'     │  '-0.99'   │
│   22    │           'Goal Symbols (Parser)'            │    '14.2±0.45µs'     │  '**14.1±0.39µs**'   │   '+1.0'   │
│   23    │            'Hello World (Parser)'            │     '4.0±0.36µs'     │     '4.0±0.14µs'     │   '0.0'    │
│   24    │             'Long file (Parser)'             │ '**789.2±21.90ns**'  │   '811.8±83.81ns'    │   '-2.9'   │
│   25    │            'Mini js (Execution)'             │ '**603.8±18.06µs**'  │   '609.7±18.77µs'    │  '-0.99'   │
│   26    │               'Mini js (Full)'               │ '**934.5±35.21µs**'  │   '943.3±24.50µs'    │  '-0.99'   │
│   27    │              'Mini js (Parser)'              │    '38.1±2.22µs'     │  '**37.5±1.03µs**'   │   '+2.0'   │
│   28    │      'Number Object Access (Execution)'      │     '4.2±0.14µs'     │   '**4.2±0.16µs**'   │   '+1.0'   │
│   29    │        'Number Object Access (Full)'         │   '306.5±12.64µs'    │  '**304.5±9.19µs**'  │   '+1.0'   │
│   30    │        'Object Creation (Execution)'         │     '4.7±0.30µs'     │     '4.7±0.31µs'     │   '0.0'    │
│   31    │           'Object Creation (Full)'           │  '**308.9±8.32µs**'  │    '314.4±9.69µs'    │   '-2.0'   │
│   32    │             'RegExp (Execution)'             │    '11.6±0.41µs'     │  '**11.4±0.80µs**'   │   '+2.0'   │
│   33    │               'RegExp (Full)'                │   '331.6±20.58µs'    │ '**324.4±12.54µs**'  │   '+2.0'   │
│   34    │         'RegExp Literal (Execution)'         │    '11.6±0.58µs'     │  '**11.2±0.42µs**'   │   '+3.0'   │
│   35    │           'RegExp Literal (Full)'            │ '**324.5±14.90µs**'  │   '327.4±18.14µs'    │  '-0.99'   │
│   36    │    'RegExp Literal Creation (Execution)'     │  '**10.0±0.43µs**'   │    '10.2±0.68µs'     │   '-2.9'   │
│   37    │       'RegExp Literal Creation (Full)'       │  '**311.4±7.48µs**'  │   '314.0±10.33µs'    │  '-0.99'   │
│   38    │ 'Static Object Property Access (Execution)'  │   '**4.9±0.18µs**'   │     '5.0±0.26µs'     │   '-2.0'   │
│   39    │    'Static Object Property Access (Full)'    │ '**316.9±12.77µs**'  │   '319.6±22.93µs'    │  '-0.99'   │
│   40    │      'String Object Access (Execution)'      │   '**7.6±0.24µs**'   │     '7.8±0.27µs'     │   '-2.0'   │
│   41    │        'String Object Access (Full)'         │ '**315.0±23.23µs**'  │   '322.4±27.23µs'    │   '-2.0'   │
│   42    │       'String comparison (Execution)'        │     '6.8±0.31µs'     │     '6.8±0.27µs'     │   '0.0'    │
│   43    │          'String comparison (Full)'          │   '316.5±14.27µs'    │   '315.9±11.89µs'    │   '0.0'    │
│   44    │      'String concatenation (Execution)'      │   '**5.5±0.26µs**'   │     '5.6±0.30µs'     │   '-2.0'   │
│   45    │        'String concatenation (Full)'         │   '313.2±21.66µs'    │ '**308.7±10.43µs**'  │   '+1.0'   │
│   46    │          'String copy (Execution)'           │   '**4.2±0.39µs**'   │     '4.3±0.17µs'     │   '-2.0'   │
│   47    │             'String copy (Full)'             │   '303.7±11.36µs'    │  '**301.4±9.94µs**'  │   '+1.0'   │
│   48    │            'Symbols (Execution)'             │   '**3.6±0.22µs**'   │     '3.6±0.36µs'     │   '-2.9'   │
│   49    │               'Symbols (Full)'               │  '**290.1±7.37µs**'  │   '294.3±31.94µs'    │  '-0.99'   │
│   50    │                      ''                      │      undefined       │      undefined       │   '+NaN'   │
└─────────┴──────────────────────────────────────────────┴──────────────────────┴──────────────────────┴────────────┘

@HalidOdat HalidOdat merged commit e187489 into boa-dev:master May 21, 2021
@Razican Razican added this to the v0.12.0 milestone May 22, 2021
@Razican Razican added builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request labels 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 BigInt.prototype[ @@toStringTag ]
3 participants