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

Refactor JavaScript bigint rust type #1408

Merged
merged 1 commit into from
Jul 22, 2021
Merged

Refactor JavaScript bigint rust type #1408

merged 1 commit into from
Jul 22, 2021

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Jul 18, 2021

This PR is cleans up JavaScript bigint creation and operations, making it more intuitive for the user, removing the double bigint types BigInt and JsBigInt (like #1382 ), since we had to do RcBigInt::from(BigInt::from(100)), but now this is much more simple JsBigInt::new(100).

It changes the following:

  • Move src/value/rcbigint.rs to src/bigint.rs
  • Rename RcBigInt to JsBigInt (Js prefix for JavaScript rust types #1376 )
  • Make pow, shift_left, shift_right to take context since they can throw.
  • Make operations into associative functions.
  • Fix conversion from string to bigint bug.

@github-actions
Copy link

github-actions bot commented Jul 18, 2021

Test262 conformance changes:

Test result master count PR count difference
Total 78,897 78,897 0
Passed 27,954 27,964 +10
Ignored 15,616 15,616 0
Failed 35,327 35,317 -10
Panics 0 0 0
Conformance 35.43% 35.44% +0.01%
Fixed tests:
test/built-ins/BigInt/constructor-trailing-leading-spaces.js [strict mode] (previously Failed)
test/built-ins/BigInt/constructor-trailing-leading-spaces.js (previously Failed)
test/built-ins/BigInt/asIntN/bigint-tobigint.js [strict mode] (previously Failed)
test/built-ins/BigInt/asIntN/bigint-tobigint.js (previously Failed)
test/built-ins/BigInt/asUintN/bigint-tobigint.js [strict mode] (previously Failed)
test/built-ins/BigInt/asUintN/bigint-tobigint.js (previously Failed)
test/language/expressions/less-than/bigint-and-string.js [strict mode] (previously Failed)
test/language/expressions/less-than/bigint-and-string.js (previously Failed)
test/language/expressions/greater-than/bigint-and-string.js [strict mode] (previously Failed)
test/language/expressions/greater-than/bigint-and-string.js (previously Failed)

@HalidOdat HalidOdat force-pushed the refactor/bigint branch 2 times, most recently from 0a84210 to dcd70a9 Compare July 18, 2021 16:47
@github-actions
Copy link

Benchmark for a84b38e

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 273.2±3.62ns 268.5±4.01ns +1.75%
Arithmetic operations (Full) 271.9±3.75µs 278.8±3.04µs -2.47%
Array access (Execution) 6.2±0.07µs 6.2±0.11µs 0.00%
Array access (Full) 304.9±4.08µs 296.7±5.38µs +2.76%
Array creation (Execution) 2.7±0.04ms 2.7±0.04ms 0.00%
Array creation (Full) 3.2±0.03ms 3.1±0.04ms +3.23%
Array pop (Execution) 893.8±10.36µs 894.6±14.58µs -0.09%
Array pop (Full) 1413.0±22.36µs 1396.7±18.63µs +1.17%
Boolean Object Access (Execution) 5.3±0.07µs 5.3±0.07µs 0.00%
Boolean Object Access (Full) 294.0±4.85µs 297.5±3.24µs -1.18%
Clean js (Execution) 615.3±6.66µs 617.9±8.64µs -0.42%
Clean js (Full) 941.7±12.17µs 958.1±8.20µs -1.71%
Clean js (Parser) 38.1±0.55µs 40.0±0.54µs -4.75%
Create Realm 417.0±4.81ns 420.6±4.06ns -0.86%
Dynamic Object Property Access (Execution) 5.0±0.05µs 5.1±0.10µs -1.96%
Dynamic Object Property Access (Full) 299.7±4.67µs 298.6±4.77µs +0.37%
Expression (Parser) 6.7±0.15µs 7.0±0.09µs -4.29%
Fibonacci (Execution) 744.8±8.61µs 750.7±9.46µs -0.79%
Fibonacci (Full) 1066.6±16.03µs 1071.7±14.61µs -0.48%
For loop (Execution) 19.9±0.26µs 20.0±0.21µs -0.50%
For loop (Full) 312.2±4.10µs 307.9±3.97µs +1.40%
For loop (Parser) 18.3±0.26µs 19.1±0.29µs -4.19%
Goal Symbols (Parser) 13.3±0.20µs 14.0±0.24µs -5.00%
Hello World (Parser) 3.8±0.06µs 3.8±0.05µs 0.00%
Long file (Parser) 786.6±10.98ns 782.1±10.65ns +0.58%
Mini js (Execution) 556.1±8.05µs 553.2±10.22µs +0.52%
Mini js (Full) 879.6±11.50µs 875.9±11.80µs +0.42%
Mini js (Parser) 33.1±0.54µs 35.0±0.38µs -5.43%
Number Object Access (Execution) 4.2±0.04µs 4.1±0.07µs +2.44%
Number Object Access (Full) 291.7±4.64µs 287.7±4.53µs +1.39%
Object Creation (Execution) 4.4±0.05µs 4.5±0.07µs -2.22%
Object Creation (Full) 299.6±3.38µs 293.6±4.77µs +2.04%
RegExp (Execution) 12.8±0.16µs 12.5±0.25µs +2.40%
RegExp (Full) 301.5±4.95µs 303.9±3.99µs -0.79%
RegExp Literal (Execution) 12.9±0.17µs 12.5±0.19µs +3.20%
RegExp Literal (Full) 312.0±6.74µs 310.4±3.15µs +0.52%
RegExp Literal Creation (Execution) 10.0±0.07µs 10.1±0.15µs -0.99%
RegExp Literal Creation (Full) 299.1±5.17µs 297.2±5.80µs +0.64%
Static Object Property Access (Execution) 4.7±0.04µs 4.7±0.09µs 0.00%
Static Object Property Access (Full) 299.1±3.67µs 291.2±6.29µs +2.71%
String Object Access (Execution) 6.8±0.07µs 6.8±0.15µs 0.00%
String Object Access (Full) 297.2±5.19µs 301.2±2.71µs -1.33%
String comparison (Execution) 6.4±0.09µs 6.5±0.10µs -1.54%
String comparison (Full) 300.7±1.93µs 298.4±4.28µs +0.77%
String concatenation (Execution) 5.0±0.08µs 5.0±0.08µs 0.00%
String concatenation (Full) 293.7±2.05µs 291.6±3.61µs +0.72%
String copy (Execution) 4.0±0.05µs 4.0±0.06µs 0.00%
String copy (Full) 282.2±3.66µs 281.3±4.82µs +0.32%
Symbols (Execution) 3.4±0.04µs 3.6±0.03µs -5.56%
Symbols (Full) 273.7±4.88µs 271.7±3.19µs +0.74%

@github-actions
Copy link

Benchmark for 41e5bb0

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 205.5±0.43ns 231.9±0.71ns -11.38%
Arithmetic operations (Full) 234.8±0.49µs 208.7±0.50µs +12.51%
Array access (Execution) 4.7±0.01µs 5.4±0.01µs -12.96%
Array access (Full) 257.6±0.83µs 257.7±0.32µs -0.04%
Array creation (Execution) 2.0±0.00ms 2.0±0.00ms 0.00%
Array creation (Full) 2.4±0.01ms 2.3±0.00ms +4.35%
Array pop (Execution) 669.9±3.23µs 671.3±2.87µs -0.21%
Array pop (Full) 1070.1±1.29µs 1047.9±1.85µs +2.12%
Boolean Object Access (Execution) 4.0±0.02µs 4.1±0.03µs -2.44%
Boolean Object Access (Full) 251.9±0.36µs 224.6±0.32µs +12.15%
Clean js (Execution) 463.1±2.14µs 525.0±3.50µs -11.79%
Clean js (Full) 717.9±2.88µs 713.9±2.11µs +0.56%
Clean js (Parser) 30.4±0.07µs 31.6±0.12µs -3.80%
Create Realm 354.5±3.56ns 352.2±0.50ns +0.65%
Dynamic Object Property Access (Execution) 4.3±0.01µs 3.9±0.03µs +10.26%
Dynamic Object Property Access (Full) 224.1±0.55µs 226.6±1.10µs -1.10%
Expression (Parser) 5.9±0.01µs 5.3±0.01µs +11.32%
Fibonacci (Execution) 645.7±3.30µs 570.7±1.28µs +13.14%
Fibonacci (Full) 811.1±1.25µs 923.5±0.99µs -12.17%
For loop (Execution) 14.9±0.13µs 14.9±0.06µs 0.00%
For loop (Full) 234.8±0.64µs 234.0±3.41µs +0.34%
For loop (Parser) 16.6±0.03µs 15.2±0.03µs +9.21%
Goal Symbols (Parser) 10.6±0.04µs 11.1±0.03µs -4.50%
Hello World (Parser) 2.9±0.01µs 3.0±0.01µs -3.33%
Long file (Parser) 719.3±0.57ns 656.6±2.89ns +9.55%
Mini js (Execution) 417.6±4.11µs 473.5±2.18µs -11.81%
Mini js (Full) 668.3±2.38µs 666.5±2.07µs +0.27%
Mini js (Parser) 26.4±0.18µs 27.7±0.11µs -4.69%
Number Object Access (Execution) 3.6±0.01µs 3.1±0.01µs +16.13%
Number Object Access (Full) 219.8±0.59µs 219.9±0.67µs -0.05%
Object Creation (Execution) 3.5±0.21µs 3.4±0.01µs +2.94%
Object Creation (Full) 221.8±0.35µs 222.6±0.24µs -0.36%
RegExp (Execution) 9.7±0.06µs 9.6±0.03µs +1.04%
RegExp (Full) 227.0±0.63µs 228.7±1.14µs -0.74%
RegExp Literal (Execution) 11.0±0.04µs 9.6±0.03µs +14.58%
RegExp Literal (Full) 234.1±0.92µs 236.6±1.14µs -1.06%
RegExp Literal Creation (Execution) 8.4±0.04µs 7.4±0.02µs +13.51%
RegExp Literal Creation (Full) 255.8±0.43µs 225.2±0.39µs +13.59%
Static Object Property Access (Execution) 4.0±0.01µs 3.5±0.01µs +14.29%
Static Object Property Access (Full) 221.8±0.55µs 224.5±0.27µs -1.20%
String Object Access (Execution) 5.9±0.07µs 5.9±0.02µs 0.00%
String Object Access (Full) 225.0±0.66µs 226.2±0.49µs -0.53%
String comparison (Execution) 5.4±0.01µs 4.8±0.02µs +12.50%
String comparison (Full) 223.3±0.38µs 256.6±0.38µs -12.98%
String concatenation (Execution) 3.8±0.04µs 3.8±0.02µs 0.00%
String concatenation (Full) 217.1±0.49µs 248.8±0.59µs -12.74%
String copy (Execution) 3.0±0.02µs 3.0±0.01µs 0.00%
String copy (Full) 213.7±0.51µs 216.1±1.16µs -1.11%
Symbols (Execution) 2.5±0.01µs 2.6±0.02µs -3.85%
Symbols (Full) 231.4±0.33µs 231.9±1.54µs -0.22%

@github-actions
Copy link

Benchmark for 220b943

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 241.3±11.22ns 237.5±12.55ns +1.60%
Arithmetic operations (Full) 245.4±12.36µs 240.8±10.40µs +1.91%
Array access (Execution) 5.9±0.25µs 5.8±0.29µs +1.72%
Array access (Full) 277.3±12.82µs 262.9±11.78µs +5.48%
Array creation (Execution) 2.2±0.07ms 2.4±0.12ms -8.33%
Array creation (Full) 2.6±0.11ms 2.7±0.14ms -3.70%
Array pop (Execution) 767.8±51.08µs 814.6±39.28µs -5.75%
Array pop (Full) 1190.4±67.40µs 1207.9±51.29µs -1.45%
Boolean Object Access (Execution) 4.8±0.22µs 4.7±0.26µs +2.13%
Boolean Object Access (Full) 256.7±10.20µs 262.9±12.09µs -2.36%
Clean js (Execution) 553.2±22.49µs 562.4±32.97µs -1.64%
Clean js (Full) 832.0±47.76µs 856.2±37.68µs -2.83%
Clean js (Parser) 35.2±1.45µs 35.8±1.74µs -1.68%
Create Realm 379.7±18.75ns 364.9±19.10ns +4.06%
Dynamic Object Property Access (Execution) 4.5±0.20µs 4.6±0.23µs -2.17%
Dynamic Object Property Access (Full) 252.7±11.64µs 263.6±11.83µs -4.14%
Expression (Parser) 5.8±0.27µs 6.3±0.40µs -7.94%
Fibonacci (Execution) 657.2±26.84µs 664.0±31.41µs -1.02%
Fibonacci (Full) 991.4±53.40µs 929.1±31.79µs +6.71%
For loop (Execution) 18.9±0.70µs 17.4±0.85µs +8.62%
For loop (Full) 284.9±11.32µs 269.9±10.70µs +5.56%
For loop (Parser) 16.2±0.78µs 18.2±0.90µs -10.99%
Goal Symbols (Parser) 12.3±0.67µs 12.6±0.69µs -2.38%
Hello World (Parser) 3.3±0.16µs 3.4±0.18µs -2.94%
Long file (Parser) 690.9±32.50ns 685.9±32.90ns +0.73%
Mini js (Execution) 503.6±21.11µs 474.4±24.00µs +6.16%
Mini js (Full) 768.5±25.96µs 780.1±32.35µs -1.49%
Mini js (Parser) 29.5±1.43µs 30.0±1.14µs -1.67%
Number Object Access (Execution) 3.7±0.18µs 3.7±0.19µs 0.00%
Number Object Access (Full) 246.8±10.73µs 260.1±12.78µs -5.11%
Object Creation (Execution) 4.2±0.26µs 3.9±0.20µs +7.69%
Object Creation (Full) 259.1±13.02µs 260.3±12.62µs -0.46%
RegExp (Execution) 10.8±0.36µs 11.3±0.52µs -4.42%
RegExp (Full) 253.5±9.78µs 267.5±17.90µs -5.23%
RegExp Literal (Execution) 11.0±0.49µs 11.4±0.58µs -3.51%
RegExp Literal (Full) 281.7±15.05µs 270.3±13.01µs +4.22%
RegExp Literal Creation (Execution) 8.4±0.34µs 8.5±0.39µs -1.18%
RegExp Literal Creation (Full) 255.3±11.05µs 262.3±14.51µs -2.67%
Static Object Property Access (Execution) 4.1±0.21µs 4.1±0.19µs 0.00%
Static Object Property Access (Full) 257.6±9.97µs 263.2±15.12µs -2.13%
String Object Access (Execution) 6.3±0.22µs 6.0±0.31µs +5.00%
String Object Access (Full) 260.9±11.28µs 267.0±9.71µs -2.28%
String comparison (Execution) 5.7±0.34µs 5.6±0.25µs +1.79%
String comparison (Full) 258.2±11.89µs 259.0±12.37µs -0.31%
String concatenation (Execution) 4.5±0.33µs 4.4±0.21µs +2.27%
String concatenation (Full) 255.9±11.28µs 256.1±11.46µs -0.08%
String copy (Execution) 3.7±0.18µs 3.5±0.19µs +5.71%
String copy (Full) 254.4±20.91µs 246.9±11.69µs +3.04%
Symbols (Execution) 3.0±0.17µs 3.1±0.14µs -3.23%
Symbols (Full) 249.4±12.71µs 236.2±14.96µs +5.59%

@github-actions
Copy link

Benchmark for 6db9d0a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 223.4±0.24ns 231.4±1.14ns -3.46%
Arithmetic operations (Full) 236.9±0.51µs 233.7±0.36µs +1.37%
Array access (Execution) 5.4±0.02µs 5.4±0.03µs 0.00%
Array access (Full) 259.0±0.60µs 258.0±0.51µs +0.39%
Array creation (Execution) 2.4±0.00ms 2.3±0.00ms +4.35%
Array creation (Full) 2.6±0.00ms 2.6±0.00ms 0.00%
Array pop (Execution) 776.5±4.05µs 762.4±2.17µs +1.85%
Array pop (Full) 1200.4±1.17µs 1187.2±1.17µs +1.11%
Boolean Object Access (Execution) 4.6±0.01µs 4.6±0.01µs 0.00%
Boolean Object Access (Full) 254.6±0.36µs 249.9±0.35µs +1.88%
Clean js (Execution) 528.3±3.37µs 533.5±3.61µs -0.97%
Clean js (Full) 811.9±2.13µs 804.7±2.11µs +0.89%
Clean js (Parser) 34.9±0.05µs 36.0±0.04µs -3.06%
Create Realm 353.9±0.24ns 352.8±0.27ns +0.31%
Dynamic Object Property Access (Execution) 4.3±0.02µs 4.4±0.02µs -2.27%
Dynamic Object Property Access (Full) 254.6±0.33µs 255.4±0.51µs -0.31%
Expression (Parser) 5.8±0.03µs 6.0±0.00µs -3.33%
Fibonacci (Execution) 643.2±1.91µs 647.5±1.89µs -0.66%
Fibonacci (Full) 929.8±1.06µs 925.1±11.34µs +0.51%
For loop (Execution) 16.9±0.06µs 17.0±0.04µs -0.59%
For loop (Full) 264.4±1.37µs 266.4±0.35µs -0.75%
For loop (Parser) 16.7±0.02µs 17.3±0.02µs -3.47%
Goal Symbols (Parser) 12.2±0.02µs 12.5±0.03µs -2.40%
Hello World (Parser) 3.3±0.01µs 3.3±0.02µs 0.00%
Long file (Parser) 722.3±1.38ns 733.4±2.24ns -1.51%
Mini js (Execution) 475.4±3.50µs 483.3±2.24µs -1.63%
Mini js (Full) 759.1±2.64µs 751.6±2.81µs +1.00%
Mini js (Parser) 30.6±0.03µs 31.4±0.03µs -2.55%
Number Object Access (Execution) 3.6±0.01µs 3.6±0.01µs 0.00%
Number Object Access (Full) 251.0±0.21µs 247.0±0.51µs +1.62%
Object Creation (Execution) 3.8±0.01µs 3.8±0.02µs 0.00%
Object Creation (Full) 252.2±0.40µs 250.5±0.64µs +0.68%
RegExp (Execution) 10.7±0.04µs 10.8±0.03µs -0.93%
RegExp (Full) 257.9±0.44µs 257.8±1.90µs +0.04%
RegExp Literal (Execution) 10.7±0.03µs 10.9±0.03µs -1.83%
RegExp Literal (Full) 263.7±0.39µs 263.2±1.11µs +0.19%
RegExp Literal Creation (Execution) 8.2±0.03µs 8.4±0.04µs -2.38%
RegExp Literal Creation (Full) 256.1±0.67µs 255.3±0.36µs +0.31%
Static Object Property Access (Execution) 3.9±0.01µs 4.0±0.01µs -2.50%
Static Object Property Access (Full) 253.6±0.39µs 251.3±0.28µs +0.92%
String Object Access (Execution) 5.8±0.01µs 5.9±0.01µs -1.69%
String Object Access (Full) 257.9±0.81µs 252.3±0.31µs +2.22%
String comparison (Execution) 5.4±0.01µs 5.4±0.01µs 0.00%
String comparison (Full) 253.0±0.32µs 253.8±1.82µs -0.32%
String concatenation (Execution) 4.2±0.01µs 4.2±0.01µs 0.00%
String concatenation (Full) 248.3±0.56µs 247.2±0.33µs +0.44%
String copy (Execution) 3.4±0.01µs 3.5±0.02µs -2.86%
String copy (Full) 241.9±0.41µs 242.4±0.38µs -0.21%
Symbols (Execution) 2.9±0.01µs 2.9±0.03µs 0.00%
Symbols (Full) 232.4±0.97µs 230.1±0.31µs +1.00%

 - Move src/value/rcbigint.rs to src/bigint.rs
 - Rename RcBigInt to JsBigInt
@HalidOdat HalidOdat added the bug Something isn't working label Jul 22, 2021
@HalidOdat HalidOdat merged commit 2cd32ed into master Jul 22, 2021
@HalidOdat HalidOdat deleted the refactor/bigint branch July 22, 2021 11:59
@github-actions
Copy link

Benchmark for 36311db

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 246.5±0.51ns 205.4±0.80ns +20.01%
Arithmetic operations (Full) 234.0±0.54µs 206.6±0.94µs +13.26%
Array access (Execution) 5.4±0.02µs 4.8±0.02µs +12.50%
Array access (Full) 255.9±0.45µs 225.7±2.01µs +13.38%
Array creation (Execution) 2.4±0.00ms 1966.7±6.20µs +22.03%
Array creation (Full) 2.4±0.00ms 2.3±0.00ms +4.35%
Array pop (Execution) 775.8±2.20µs 657.3±3.91µs +18.03%
Array pop (Full) 1124.5±1.10µs 1052.2±2.67µs +6.87%
Boolean Object Access (Execution) 4.6±0.01µs 4.0±0.01µs +15.00%
Boolean Object Access (Full) 250.0±0.30µs 221.5±0.41µs +12.87%
Clean js (Execution) 532.9±2.47µs 464.1±3.02µs +14.82%
Clean js (Full) 803.8±4.35µs 721.4±2.61µs +11.42%
Clean js (Parser) 34.3±1.25µs 31.6±0.03µs +8.54%
Create Realm 362.1±0.44ns 309.8±0.36ns +16.88%
Dynamic Object Property Access (Execution) 4.3±0.02µs 3.8±0.01µs +13.16%
Dynamic Object Property Access (Full) 252.2±0.40µs 252.6±2.60µs -0.16%
Expression (Parser) 5.8±0.01µs 5.6±0.02µs +3.57%
Fibonacci (Execution) 652.0±1.40µs 569.5±1.37µs +14.49%
Fibonacci (Full) 922.8±1.37µs 923.1±1.52µs -0.03%
For loop (Execution) 17.0±0.09µs 15.0±0.05µs +13.33%
For loop (Full) 262.8±1.27µs 263.4±0.37µs -0.23%
For loop (Parser) 16.5±0.03µs 15.3±0.03µs +7.84%
Goal Symbols (Parser) 12.0±0.03µs 11.0±0.02µs +9.09%
Hello World (Parser) 3.2±0.00µs 3.0±0.01µs +6.67%
Long file (Parser) 690.7±0.42ns 621.7±9.22ns +11.10%
Mini js (Execution) 482.9±13.51µs 418.2±4.70µs +15.47%
Mini js (Full) 747.7±2.51µs 672.9±2.83µs +11.12%
Mini js (Parser) 30.3±0.02µs 27.5±0.02µs +10.18%
Number Object Access (Execution) 3.6±0.01µs 3.2±0.01µs +12.50%
Number Object Access (Full) 246.8±0.30µs 218.1±0.86µs +13.16%
Object Creation (Execution) 3.8±0.01µs 3.4±0.02µs +11.76%
Object Creation (Full) 247.2±0.63µs 220.4±1.85µs +12.16%
RegExp (Execution) 10.8±0.02µs 9.6±0.10µs +12.50%
RegExp (Full) 256.1±0.58µs 225.5±2.16µs +13.57%
RegExp Literal (Execution) 10.9±0.16µs 9.7±0.04µs +12.37%
RegExp Literal (Full) 262.5±0.33µs 228.8±2.48µs +14.73%
RegExp Literal Creation (Execution) 8.5±0.06µs 7.4±0.03µs +14.86%
RegExp Literal Creation (Full) 252.1±0.51µs 224.6±1.73µs +12.24%
Static Object Property Access (Execution) 4.0±0.01µs 4.0±0.01µs 0.00%
Static Object Property Access (Full) 249.0±0.32µs 219.4±1.95µs +13.49%
String Object Access (Execution) 5.9±0.03µs 5.2±0.01µs +13.46%
String Object Access (Full) 252.2±0.36µs 224.3±1.31µs +12.44%
String comparison (Execution) 5.5±0.02µs 4.8±0.05µs +14.58%
String comparison (Full) 250.9±0.35µs 221.7±2.01µs +13.17%
String concatenation (Execution) 4.3±0.01µs 3.8±0.03µs +13.16%
String concatenation (Full) 246.5±0.46µs 216.9±2.68µs +13.65%
String copy (Execution) 3.3±0.01µs 3.0±0.02µs +10.00%
String copy (Full) 241.5±1.26µs 213.8±1.38µs +12.96%
Symbols (Execution) 2.9±0.02µs 2.6±0.00µs +11.54%
Symbols (Full) 229.5±0.43µs 202.3±1.28µs +13.45%

@github-actions
Copy link

Benchmark for 36529fb

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 311.5±2.93ns 272.3±3.17ns +14.40%
Arithmetic operations (Full) 276.8±2.68µs 271.9±3.63µs +1.80%
Array access (Execution) 6.4±0.10µs 6.5±0.10µs -1.54%
Array access (Full) 299.7±4.05µs 300.6±4.03µs -0.30%
Array creation (Execution) 2.8±0.05ms 2.7±0.00ms +3.70%
Array creation (Full) 2.8±0.03ms 3.1±0.04ms -9.68%
Array pop (Execution) 915.2±11.69µs 884.1±6.64µs +3.52%
Array pop (Full) 1315.7±19.94µs 1431.3±13.36µs -8.08%
Boolean Object Access (Execution) 5.4±0.10µs 5.4±0.08µs 0.00%
Boolean Object Access (Full) 291.9±4.10µs 293.1±4.81µs -0.41%
Clean js (Execution) 635.7±4.07µs 617.4±8.34µs +2.96%
Clean js (Full) 946.5±12.52µs 965.4±10.81µs -1.96%
Clean js (Parser) 38.9±0.44µs 40.1±0.52µs -2.99%
Create Realm 433.4±17.22ns 413.1±6.02ns +4.91%
Dynamic Object Property Access (Execution) 5.2±0.10µs 5.1±0.04µs +1.96%
Dynamic Object Property Access (Full) 296.2±3.93µs 294.9±3.97µs +0.44%
Expression (Parser) 6.7±0.10µs 7.2±0.07µs -6.94%
Fibonacci (Execution) 758.9±9.92µs 753.5±12.14µs +0.72%
Fibonacci (Full) 1075.0±15.34µs 1083.3±13.42µs -0.77%
For loop (Execution) 19.8±0.28µs 20.0±0.29µs -1.00%
For loop (Full) 305.6±4.26µs 314.0±1.44µs -2.68%
For loop (Parser) 18.4±0.23µs 19.6±0.30µs -6.12%
Goal Symbols (Parser) 13.6±0.07µs 14.1±0.18µs -3.55%
Hello World (Parser) 3.7±0.06µs 3.8±0.05µs -2.63%
Long file (Parser) 790.3±10.41ns 788.7±14.32ns +0.20%
Mini js (Execution) 560.2±7.50µs 557.5±8.71µs +0.48%
Mini js (Full) 874.9±12.31µs 902.1±9.65µs -3.02%
Mini js (Parser) 33.4±0.44µs 34.3±0.56µs -2.62%
Number Object Access (Execution) 4.2±0.06µs 4.2±0.06µs 0.00%
Number Object Access (Full) 289.2±5.18µs 287.9±4.06µs +0.45%
Object Creation (Execution) 4.4±0.06µs 4.6±0.04µs -4.35%
Object Creation (Full) 288.8±4.34µs 297.0±4.06µs -2.76%
RegExp (Execution) 13.0±0.07µs 12.5±0.18µs +4.00%
RegExp (Full) 298.1±4.29µs 304.7±4.69µs -2.17%
RegExp Literal (Execution) 12.6±0.21µs 12.9±0.17µs -2.33%
RegExp Literal (Full) 308.5±3.89µs 313.1±4.18µs -1.47%
RegExp Literal Creation (Execution) 9.9±0.15µs 9.8±0.14µs +1.02%
RegExp Literal Creation (Full) 293.0±3.93µs 299.6±3.72µs -2.20%
Static Object Property Access (Execution) 4.7±0.06µs 4.7±0.09µs 0.00%
Static Object Property Access (Full) 290.8±4.13µs 294.1±3.57µs -1.12%
String Object Access (Execution) 6.9±0.10µs 7.0±0.06µs -1.43%
String Object Access (Full) 298.2±4.16µs 295.0±5.34µs +1.08%
String comparison (Execution) 6.4±0.09µs 6.5±0.11µs -1.54%
String comparison (Full) 296.7±4.83µs 299.3±4.51µs -0.87%
String concatenation (Execution) 5.0±0.09µs 5.0±0.07µs 0.00%
String concatenation (Full) 291.5±1.94µs 290.3±4.27µs +0.41%
String copy (Execution) 3.9±0.05µs 4.1±0.06µs -4.88%
String copy (Full) 285.0±3.82µs 286.0±4.38µs -0.35%
Symbols (Execution) 3.4±0.05µs 3.4±0.06µs 0.00%
Symbols (Full) 268.0±5.32µs 270.6±3.98µs -0.96%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API bug Something isn't working technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant