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

[Merged by Bors] - Create new lazy Error type #2283

Closed
wants to merge 6 commits into from
Closed

Conversation

jedel1043
Copy link
Member

@jedel1043 jedel1043 commented Sep 15, 2022

This is an experiment that tries to migrate the codebase from eager Error objects to lazy ones.

In short words, this redefines JsResult = Result<JsValue, JsError>, where JsError is a brand new type that stores only the essential part of an error type, and only transforms those errors to JsObjects on demand (when having to pass them as arguments to functions or store them inside async/generators).

This change is pretty big, because it unblocks a LOT of code from having to take a &mut Context on each call. It also paves the road for possibly making JsError a proper variant of JsValue, which can be a pretty big optimization for try/catch.

A downside of this is that it exposes some brand new error types to our public API. However, we can now implement Error on JsError, making our JsResult type a bit more inline with Rust's best practices.

Will mark this as draft, since it's missing some documentation and a lot of examples, but it's pretty much feature complete. As always, any comments about the design are very much appreciated!

Note: Since there are a lot of changes which are essentially just rewriting context.throw to JsNativeError::%type%, I'll leave an "index" of the most important changes here:

@jedel1043 jedel1043 added enhancement New feature or request performance Performance related changes and issues discussion Issues needing more discussion execution Issues or PRs related to code execution API run-benchmark Label used to run banchmarks on PRs labels Sep 15, 2022
@github-actions
Copy link

github-actions bot commented Sep 15, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 93,383 93,383 0
Passed 69,095 69,095 0
Ignored 18,182 18,182 0
Failed 6,106 6,106 0
Panics 0 0 0
Conformance 73.99% 73.99% 0.00%
Fixed tests (4):
test/language/expressions/super/prop-expr-cls-this-uninit.js [strict mode] (previously Failed)
test/language/expressions/super/prop-expr-cls-this-uninit.js (previously Failed)
test/language/expressions/super/prop-dot-cls-this-uninit.js [strict mode] (previously Failed)
test/language/expressions/super/prop-dot-cls-this-uninit.js (previously Failed)
Broken tests (4):
test/language/literals/regexp/u-surrogate-pairs-atom-escape-decimal.js [strict mode] (previously Passed)
test/language/literals/regexp/u-surrogate-pairs-atom-escape-decimal.js (previously Passed)
test/language/literals/regexp/u-surrogate-pairs-atom-char-class.js [strict mode] (previously Passed)
test/language/literals/regexp/u-surrogate-pairs-atom-char-class.js (previously Passed)

@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #2283 (c88e1db) into main (959b9f1) will decrease coverage by 0.30%.
The diff coverage is 22.42%.

@@            Coverage Diff             @@
##             main    #2283      +/-   ##
==========================================
- Coverage   40.14%   39.84%   -0.31%     
==========================================
  Files         241      242       +1     
  Lines       22966    23242     +276     
==========================================
+ Hits         9219     9260      +41     
- Misses      13747    13982     +235     
Impacted Files Coverage Δ
boa_cli/src/main.rs 5.55% <ø> (ø)
boa_engine/src/builtins/array/array_iterator.rs 83.87% <0.00%> (-2.80%) ⬇️
boa_engine/src/builtins/async_generator/mod.rs 7.29% <0.00%> (-0.46%) ⬇️
boa_engine/src/builtins/boolean/mod.rs 56.25% <0.00%> (ø)
boa_engine/src/builtins/dataview/mod.rs 7.69% <0.00%> (-0.39%) ⬇️
boa_engine/src/builtins/error/aggregate.rs 38.88% <0.00%> (ø)
boa_engine/src/builtins/eval/mod.rs 12.90% <0.00%> (-0.44%) ⬇️
boa_engine/src/builtins/generator/mod.rs 11.62% <0.00%> (+0.26%) ⬆️
.../src/builtins/iterable/async_from_sync_iterator.rs 20.27% <0.00%> (-2.46%) ⬇️
boa_engine/src/builtins/iterable/mod.rs 45.65% <0.00%> (-2.84%) ⬇️
... and 106 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

Benchmark for 1b283bd

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 658.6±7.02ns 633.0±5.84ns -3.89%
Arithmetic operations (Execution) 774.4±11.44ns 720.9±7.93ns -6.91%
Arithmetic operations (Parser) 7.0±0.09µs 7.1±0.08µs +1.43%
Array access (Compiler) 1796.2±81.66ns 1660.3±29.42ns -7.57%
Array access (Execution) 8.3±0.12µs 8.3±0.08µs 0.00%
Array access (Parser) 14.7±0.13µs 14.5±0.22µs -1.36%
Array creation (Compiler) 2.6±0.03µs 2.5±0.04µs -3.85%
Array creation (Execution) 1274.8±31.96µs 1386.5±12.91µs +8.76%
Array creation (Parser) 17.5±0.15µs 17.1±0.23µs -2.29%
Array pop (Compiler) 4.8±0.06µs 4.9±0.07µs +2.08%
Array pop (Execution) 670.6±8.36µs 707.2±8.14µs +5.46%
Array pop (Parser) 166.4±0.75µs 167.6±2.31µs +0.72%
Boolean Object Access (Compiler) 1288.6±85.47ns 1205.1±16.71ns -6.48%
Boolean Object Access (Execution) 5.0±0.04µs 4.9±0.05µs -2.00%
Boolean Object Access (Parser) 17.6±0.19µs 17.2±0.22µs -2.27%
Clean js (Compiler) 5.7±0.40µs 5.3±0.07µs -7.02%
Clean js (Execution) 702.1±10.04µs 725.7±7.54µs +3.36%
Clean js (Parser) 35.5±0.43µs 35.5±0.74µs 0.00%
Create Realm 274.1±3.42ns 275.5±2.74ns +0.51%
Dynamic Object Property Access (Compiler) 1983.5±12.45ns 1946.3±42.79ns -1.88%
Dynamic Object Property Access (Execution) 5.5±0.07µs 5.6±0.06µs +1.82%
Dynamic Object Property Access (Parser) 13.2±0.13µs 13.2±0.14µs 0.00%
Fibonacci (Compiler) 3.1±0.05µs 3.0±0.04µs -3.23%
Fibonacci (Execution) 1198.4±16.15µs 1195.5±16.67µs -0.24%
Fibonacci (Parser) 20.2±0.36µs 21.3±1.03µs +5.45%
For loop (Compiler) 2.9±0.03µs 2.8±0.06µs -3.45%
For loop (Execution) 19.3±0.26µs 19.4±0.29µs +0.52%
For loop (Parser) 17.9±0.26µs 17.8±0.26µs -0.56%
Mini js (Compiler) 4.7±0.08µs 4.7±0.06µs 0.00%
Mini js (Execution) 650.4±4.02µs 651.7±7.60µs +0.20%
Mini js (Parser) 30.9±0.32µs 30.9±0.37µs 0.00%
Number Object Access (Compiler) 1140.0±24.11ns 1133.4±13.59ns -0.58%
Number Object Access (Execution) 3.7±0.08µs 3.8±0.03µs +2.70%
Number Object Access (Parser) 13.6±0.17µs 13.6±0.17µs 0.00%
Object Creation (Compiler) 1748.3±28.94ns 1754.5±27.67ns +0.35%
Object Creation (Execution) 5.1±0.07µs 5.2±0.09µs +1.96%
Object Creation (Parser) 11.6±0.12µs 11.6±0.20µs 0.00%
RegExp (Compiler) 2.0±0.01µs 1974.1±21.89ns -1.30%
RegExp (Execution) 13.3±0.20µs 13.6±0.10µs +2.26%
RegExp (Parser) 12.7±0.19µs 12.5±0.19µs -1.57%
RegExp Creation (Compiler) 1771.7±25.62ns 1755.6±24.48ns -0.91%
RegExp Creation (Execution) 10.0±0.13µs 10.2±0.12µs +2.00%
RegExp Creation (Parser) 10.6±0.08µs 10.6±0.08µs 0.00%
RegExp Literal (Compiler) 1978.0±24.23ns 1921.4±35.07ns -2.86%
RegExp Literal (Execution) 13.3±0.23µs 13.6±0.12µs +2.26%
RegExp Literal (Parser) 10.1±0.12µs 10.1±0.19µs 0.00%
RegExp Literal Creation (Compiler) 1769.3±21.76ns 1742.9±29.11ns -1.49%
RegExp Literal Creation (Execution) 9.9±0.17µs 10.1±0.14µs +2.02%
RegExp Literal Creation (Parser) 8.0±0.08µs 8.0±0.09µs 0.00%
Static Object Property Access (Compiler) 1759.2±34.87ns 1754.6±28.50ns -0.26%
Static Object Property Access (Execution) 5.3±0.09µs 5.4±0.07µs +1.89%
Static Object Property Access (Parser) 12.5±0.13µs 12.4±0.22µs -0.80%
String Object Access (Compiler) 1675.4±104.91ns 1554.7±19.50ns -7.20%
String Object Access (Execution) 6.9±0.09µs 7.1±0.08µs +2.90%
String Object Access (Parser) 17.0±0.19µs 16.9±0.18µs -0.59%
String comparison (Compiler) 2.6±0.03µs 2.6±0.05µs 0.00%
String comparison (Execution) 4.7±0.08µs 4.7±0.07µs 0.00%
String comparison (Parser) 13.5±0.23µs 13.5±0.23µs 0.00%
String concatenation (Compiler) 2.0±0.03µs 1992.1±31.57ns -0.40%
String concatenation (Execution) 4.4±0.05µs 4.4±0.04µs 0.00%
String concatenation (Parser) 10.0±0.39µs 9.2±0.17µs -8.00%
String copy (Compiler) 1648.6±23.05ns 1615.9±24.24ns -1.98%
String copy (Execution) 4.1±0.03µs 4.1±0.04µs 0.00%
String copy (Parser) 6.9±0.07µs 6.9±0.09µs 0.00%
Symbols (Compiler) 1257.6±12.54ns 1208.2±15.19ns -3.93%
Symbols (Execution) 4.1±0.06µs 4.1±0.05µs 0.00%
Symbols (Parser) 5.4±0.07µs 5.5±0.06µs +1.85%

@Razican Razican added this to the v0.17.0 milestone Sep 15, 2022
@github-actions
Copy link

Benchmark for 75cf117

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 616.9±15.09ns 632.8±15.10ns +2.58%
Arithmetic operations (Execution) 747.7±22.30ns 700.8±20.43ns -6.27%
Arithmetic operations (Parser) 6.9±0.15µs 6.8±0.21µs -1.45%
Array access (Compiler) 1609.1±53.33ns 1659.3±46.22ns +3.12%
Array access (Execution) 8.1±0.23µs 8.1±0.20µs 0.00%
Array access (Parser) 14.4±0.40µs 14.6±0.36µs +1.39%
Array creation (Compiler) 2.5±0.08µs 2.5±0.08µs 0.00%
Array creation (Execution) 1223.2±36.46µs 1247.6±42.14µs +1.99%
Array creation (Parser) 16.6±0.46µs 16.8±0.60µs +1.20%
Array pop (Compiler) 4.7±0.14µs 5.0±0.10µs +6.38%
Array pop (Execution) 638.5±19.77µs 657.2±19.28µs +2.93%
Array pop (Parser) 159.1±4.44µs 161.0±4.98µs +1.19%
Boolean Object Access (Compiler) 1145.7±33.03ns 1149.9±35.45ns +0.37%
Boolean Object Access (Execution) 4.8±0.17µs 4.8±0.15µs 0.00%
Boolean Object Access (Parser) 16.8±0.46µs 16.9±0.52µs +0.60%
Clean js (Compiler) 5.2±0.15µs 5.1±0.15µs -1.92%
Clean js (Execution) 687.0±20.21µs 684.8±18.08µs -0.32%
Clean js (Parser) 34.7±0.86µs 34.8±0.97µs +0.29%
Create Realm 261.8±6.81ns 297.9±4.60ns +13.79%
Dynamic Object Property Access (Compiler) 1864.9±60.90ns 1926.1±58.99ns +3.28%
Dynamic Object Property Access (Execution) 5.3±0.16µs 5.4±0.14µs +1.89%
Dynamic Object Property Access (Parser) 13.0±0.26µs 12.7±0.45µs -2.31%
Fibonacci (Compiler) 2.9±0.09µs 2.9±0.08µs 0.00%
Fibonacci (Execution) 1164.6±34.34µs 1153.0±31.70µs -1.00%
Fibonacci (Parser) 19.4±0.76µs 19.9±0.60µs +2.58%
For loop (Compiler) 2.8±0.07µs 2.8±0.06µs 0.00%
For loop (Execution) 18.9±0.48µs 18.1±0.51µs -4.23%
For loop (Parser) 17.4±0.43µs 17.6±0.62µs +1.15%
Mini js (Compiler) 4.6±0.13µs 4.5±0.12µs -2.17%
Mini js (Execution) 628.4±16.74µs 639.1±17.09µs +1.70%
Mini js (Parser) 30.1±0.99µs 30.4±0.81µs +1.00%
Number Object Access (Compiler) 1104.2±29.78ns 1099.0±50.42ns -0.47%
Number Object Access (Execution) 3.7±0.11µs 3.7±0.10µs 0.00%
Number Object Access (Parser) 13.1±0.40µs 13.1±0.42µs 0.00%
Object Creation (Compiler) 1672.9±42.46ns 1705.6±77.44ns +1.95%
Object Creation (Execution) 5.0±0.15µs 5.0±0.13µs 0.00%
Object Creation (Parser) 11.5±0.29µs 11.4±0.39µs -0.87%
RegExp (Compiler) 1870.8±51.39ns 1962.2±55.01ns +4.89%
RegExp (Execution) 12.7±0.50µs 12.8±0.32µs +0.79%
RegExp (Parser) 12.5±0.27µs 12.6±0.31µs +0.80%
RegExp Creation (Compiler) 1698.4±42.50ns 1763.8±67.35ns +3.85%
RegExp Creation (Execution) 9.7±0.24µs 9.5±0.21µs -2.06%
RegExp Creation (Parser) 10.4±0.29µs 10.5±0.23µs +0.96%
RegExp Literal (Compiler) 1865.0±62.28ns 1966.8±37.92ns +5.46%
RegExp Literal (Execution) 13.2±0.29µs 12.8±0.38µs -3.03%
RegExp Literal (Parser) 10.1±0.16µs 10.3±0.20µs +1.98%
RegExp Literal Creation (Compiler) 1677.4±64.21ns 1734.0±52.25ns +3.37%
RegExp Literal Creation (Execution) 9.6±0.28µs 9.4±0.30µs -2.08%
RegExp Literal Creation (Parser) 7.7±0.21µs 7.7±0.23µs 0.00%
Static Object Property Access (Compiler) 1688.3±52.62ns 1709.0±53.29ns +1.23%
Static Object Property Access (Execution) 5.1±0.15µs 5.2±0.15µs +1.96%
Static Object Property Access (Parser) 12.1±0.36µs 12.1±0.29µs 0.00%
String Object Access (Compiler) 1525.6±39.30ns 1526.7±45.67ns +0.07%
String Object Access (Execution) 6.8±0.21µs 6.9±0.18µs +1.47%
String Object Access (Parser) 16.7±0.63µs 16.8±0.49µs +0.60%
String comparison (Compiler) 2.5±0.08µs 2.5±0.07µs 0.00%
String comparison (Execution) 4.5±0.12µs 4.5±0.19µs 0.00%
String comparison (Parser) 13.0±0.43µs 13.3±0.40µs +2.31%
String concatenation (Compiler) 1929.0±59.05ns 1930.7±61.76ns +0.09%
String concatenation (Execution) 4.2±0.12µs 4.2±0.14µs 0.00%
String concatenation (Parser) 8.8±0.34µs 9.1±0.23µs +3.41%
String copy (Compiler) 1596.0±38.11ns 1547.3±52.08ns -3.05%
String copy (Execution) 3.9±0.11µs 3.9±0.11µs 0.00%
String copy (Parser) 6.8±0.18µs 6.8±0.20µs 0.00%
Symbols (Compiler) 1229.3±24.59ns 1176.0±32.03ns -4.34%
Symbols (Execution) 4.0±0.11µs 3.9±0.15µs -2.50%
Symbols (Parser) 5.2±0.20µs 5.5±0.12µs +5.77%

@github-actions
Copy link

Benchmark for be6f36d

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 684.6±36.52ns 717.5±39.10ns +4.81%
Arithmetic operations (Execution) 677.2±53.92ns 664.1±41.75ns -1.93%
Arithmetic operations (Parser) 8.5±0.52µs 7.2±0.40µs -15.29%
Array access (Compiler) 1890.9±130.06ns 1858.1±127.65ns -1.73%
Array access (Execution) 9.3±0.53µs 8.7±0.57µs -6.45%
Array access (Parser) 14.9±1.14µs 17.6±1.19µs +18.12%
Array creation (Compiler) 2.8±0.15µs 2.9±0.18µs +3.57%
Array creation (Execution) 1331.6±67.22µs 1233.7±61.17µs -7.35%
Array creation (Parser) 19.9±1.41µs 20.4±1.28µs +2.51%
Array pop (Compiler) 5.0±0.33µs 4.9±0.40µs -2.00%
Array pop (Execution) 676.9±45.93µs 645.3±32.06µs -4.67%
Array pop (Parser) 177.6±10.20µs 186.8±10.87µs +5.18%
Boolean Object Access (Compiler) 1393.2±149.19ns 1416.1±72.42ns +1.64%
Boolean Object Access (Execution) 5.3±0.33µs 5.2±0.27µs -1.89%
Boolean Object Access (Parser) 20.1±1.05µs 17.6±1.03µs -12.44%
Clean js (Compiler) 5.7±0.44µs 6.1±0.34µs +7.02%
Clean js (Execution) 694.0±51.11µs 687.1±31.16µs -0.99%
Clean js (Parser) 42.5±2.46µs 38.0±2.45µs -10.59%
Create Realm 275.4±18.28ns 269.7±21.53ns -2.07%
Dynamic Object Property Access (Compiler) 2.2±0.17µs 2.2±0.17µs 0.00%
Dynamic Object Property Access (Execution) 6.4±0.36µs 6.0±0.50µs -6.25%
Dynamic Object Property Access (Parser) 15.6±1.34µs 13.8±0.88µs -11.54%
Fibonacci (Compiler) 3.3±0.24µs 3.4±0.20µs +3.03%
Fibonacci (Execution) 1365.5±78.82µs 1320.7±99.56µs -3.28%
Fibonacci (Parser) 22.3±2.30µs 21.3±1.39µs -4.48%
For loop (Compiler) 3.1±0.17µs 3.3±0.20µs +6.45%
For loop (Execution) 19.7±1.32µs 20.5±1.47µs +4.06%
For loop (Parser) 17.9±1.57µs 18.4±1.07µs +2.79%
Mini js (Compiler) 5.0±0.30µs 5.3±0.34µs +6.00%
Mini js (Execution) 609.8±36.40µs 629.3±35.85µs +3.20%
Mini js (Parser) 31.4±1.97µs 32.9±2.46µs +4.78%
Number Object Access (Compiler) 1272.6±107.63ns 1327.2±71.68ns +4.29%
Number Object Access (Execution) 4.2±0.36µs 4.0±0.21µs -4.76%
Number Object Access (Parser) 14.8±2.18µs 13.7±0.83µs -7.43%
Object Creation (Compiler) 1930.0±102.91ns 1944.1±106.24ns +0.73%
Object Creation (Execution) 5.9±0.46µs 5.8±0.38µs -1.69%
Object Creation (Parser) 12.9±1.00µs 12.0±0.74µs -6.98%
RegExp (Compiler) 2.2±0.20µs 2.2±0.14µs 0.00%
RegExp (Execution) 13.9±0.77µs 14.2±0.83µs +2.16%
RegExp (Parser) 14.4±1.59µs 14.4±1.04µs 0.00%
RegExp Creation (Compiler) 2.0±0.10µs 1968.6±166.60ns -1.57%
RegExp Creation (Execution) 10.3±0.72µs 10.1±0.51µs -1.94%
RegExp Creation (Parser) 11.9±0.80µs 11.1±0.80µs -6.72%
RegExp Literal (Compiler) 2.2±0.14µs 2.2±0.10µs 0.00%
RegExp Literal (Execution) 14.3±1.03µs 14.1±0.91µs -1.40%
RegExp Literal (Parser) 11.5±0.53µs 12.8±1.26µs +11.30%
RegExp Literal Creation (Compiler) 1949.5±125.72ns 1982.7±131.69ns +1.70%
RegExp Literal Creation (Execution) 10.7±0.81µs 9.9±0.63µs -7.48%
RegExp Literal Creation (Parser) 9.3±0.60µs 8.3±0.67µs -10.75%
Static Object Property Access (Compiler) 1975.1±235.73ns 2.0±0.12µs +1.26%
Static Object Property Access (Execution) 6.2±0.43µs 5.7±0.31µs -8.06%
Static Object Property Access (Parser) 15.0±1.86µs 13.4±1.03µs -10.67%
String Object Access (Compiler) 1825.7±171.74ns 1741.0±117.69ns -4.64%
String Object Access (Execution) 7.3±0.54µs 7.4±0.43µs +1.37%
String Object Access (Parser) 19.9±0.81µs 17.3±0.93µs -13.07%
String comparison (Compiler) 2.8±0.14µs 2.9±0.15µs +3.57%
String comparison (Execution) 5.1±0.34µs 4.9±0.43µs -3.92%
String comparison (Parser) 14.2±0.82µs 14.7±0.90µs +3.52%
String concatenation (Compiler) 2.2±0.10µs 2.3±0.12µs +4.55%
String concatenation (Execution) 4.8±0.39µs 4.6±0.20µs -4.17%
String concatenation (Parser) 10.4±0.68µs 10.3±0.73µs -0.96%
String copy (Compiler) 1802.8±133.27ns 1858.6±107.67ns +3.10%
String copy (Execution) 4.6±0.33µs 4.4±0.43µs -4.35%
String copy (Parser) 7.1±0.51µs 7.5±0.48µs +5.63%
Symbols (Compiler) 1414.2±68.05ns 1434.8±87.04ns +1.46%
Symbols (Execution) 4.3±0.33µs 4.4±0.24µs +2.33%
Symbols (Parser) 5.5±0.46µs 5.7±0.36µs +3.64%

@github-actions
Copy link

Benchmark for f7ecaa4

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 551.3±1.35ns 546.3±7.35ns -0.91%
Arithmetic operations (Execution) 673.5±0.66ns 578.8±0.40ns -14.06%
Arithmetic operations (Parser) 6.4±0.01µs 6.4±0.02µs 0.00%
Array access (Compiler) 1432.5±1.67ns 1412.0±2.49ns -1.43%
Array access (Execution) 7.0±0.02µs 7.1±0.03µs +1.43%
Array access (Parser) 13.5±0.01µs 13.4±0.06µs -0.74%
Array creation (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
Array creation (Execution) 1073.8±5.66µs 1106.9±4.33µs +3.08%
Array creation (Parser) 15.8±0.16µs 15.8±0.02µs 0.00%
Array pop (Compiler) 4.0±0.02µs 4.1±0.02µs +2.50%
Array pop (Execution) 567.7±4.86µs 564.3±2.13µs -0.60%
Array pop (Parser) 147.2±0.58µs 150.0±0.18µs +1.90%
Boolean Object Access (Compiler) 1130.9±2.40ns 1153.1±2.46ns +1.96%
Boolean Object Access (Execution) 4.2±0.01µs 4.1±0.01µs -2.38%
Boolean Object Access (Parser) 15.8±0.09µs 15.6±0.05µs -1.27%
Clean js (Compiler) 4.6±0.01µs 4.6±0.01µs 0.00%
Clean js (Execution) 600.4±3.24µs 610.9±5.67µs +1.75%
Clean js (Parser) 32.4±0.07µs 32.5±0.08µs +0.31%
Create Realm 229.2±3.84ns 231.7±0.51ns +1.09%
Dynamic Object Property Access (Compiler) 1673.2±3.36ns 1665.5±3.98ns -0.46%
Dynamic Object Property Access (Execution) 4.6±0.03µs 4.7±0.01µs +2.17%
Dynamic Object Property Access (Parser) 12.1±0.02µs 12.1±0.02µs 0.00%
Fibonacci (Compiler) 2.6±0.01µs 2.6±0.00µs 0.00%
Fibonacci (Execution) 1016.0±2.87µs 1032.7±1.98µs +1.64%
Fibonacci (Parser) 18.4±0.02µs 18.5±0.02µs +0.54%
For loop (Compiler) 2.4±0.01µs 2.4±0.01µs 0.00%
For loop (Execution) 16.2±0.05µs 16.1±0.04µs -0.62%
For loop (Parser) 16.1±0.03µs 16.1±0.02µs 0.00%
Mini js (Compiler) 4.1±0.01µs 4.0±0.01µs -2.44%
Mini js (Execution) 550.5±14.04µs 552.0±3.04µs +0.27%
Mini js (Parser) 28.1±0.03µs 28.3±0.14µs +0.71%
Number Object Access (Compiler) 1063.2±2.84ns 1074.8±3.18ns +1.09%
Number Object Access (Execution) 3.2±0.01µs 3.1±0.01µs -3.13%
Number Object Access (Parser) 12.3±0.01µs 12.2±0.04µs -0.81%
Object Creation (Compiler) 1481.9±6.53ns 1474.4±6.25ns -0.51%
Object Creation (Execution) 4.4±0.03µs 4.4±0.05µs 0.00%
Object Creation (Parser) 10.6±0.02µs 10.6±0.02µs 0.00%
RegExp (Compiler) 1655.2±6.20ns 1642.1±7.21ns -0.79%
RegExp (Execution) 11.3±0.03µs 11.0±0.03µs -2.65%
RegExp (Parser) 11.6±0.02µs 11.5±0.01µs -0.86%
RegExp Creation (Compiler) 1539.2±5.72ns 1488.3±13.22ns -3.31%
RegExp Creation (Execution) 8.4±0.02µs 8.0±0.03µs -4.76%
RegExp Creation (Parser) 9.8±0.01µs 9.7±0.01µs -1.02%
RegExp Literal (Compiler) 1675.3±3.71ns 1644.5±3.85ns -1.84%
RegExp Literal (Execution) 11.3±0.03µs 11.1±0.07µs -1.77%
RegExp Literal (Parser) 9.4±0.01µs 9.4±0.02µs 0.00%
RegExp Literal Creation (Compiler) 1499.6±8.18ns 1481.1±7.00ns -1.23%
RegExp Literal Creation (Execution) 8.4±0.02µs 8.1±0.02µs -3.57%
RegExp Literal Creation (Parser) 7.4±0.01µs 7.3±0.01µs -1.35%
Static Object Property Access (Compiler) 1514.9±4.72ns 1483.5±6.82ns -2.07%
Static Object Property Access (Execution) 4.5±0.03µs 4.5±0.01µs 0.00%
Static Object Property Access (Parser) 11.4±0.11µs 11.3±0.04µs -0.88%
String Object Access (Compiler) 1414.3±4.74ns 1422.1±13.92ns +0.55%
String Object Access (Execution) 5.9±0.02µs 6.0±0.02µs +1.69%
String Object Access (Parser) 15.3±0.02µs 15.2±0.02µs -0.65%
String comparison (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
String comparison (Execution) 4.0±0.01µs 4.0±0.01µs 0.00%
String comparison (Parser) 12.6±0.02µs 12.5±0.03µs -0.79%
String concatenation (Compiler) 1676.8±7.30ns 1674.0±12.86ns -0.17%
String concatenation (Execution) 3.7±0.01µs 3.7±0.01µs 0.00%
String concatenation (Parser) 8.8±0.01µs 8.7±0.02µs -1.14%
String copy (Compiler) 1353.6±3.68ns 1357.8±3.21ns +0.31%
String copy (Execution) 3.4±0.01µs 3.5±0.01µs +2.94%
String copy (Parser) 6.6±0.01µs 6.5±0.02µs -1.52%
Symbols (Compiler) 1041.0±1.62ns 1038.2±2.75ns -0.27%
Symbols (Execution) 3.5±0.01µs 3.5±0.01µs 0.00%
Symbols (Parser) 5.1±0.05µs 5.1±0.01µs 0.00%

@github-actions
Copy link

Benchmark for 761a735

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 646.3±63.45ns 682.4±29.45ns +5.59%
Arithmetic operations (Execution) 690.4±36.91ns 661.4±50.06ns -4.20%
Arithmetic operations (Parser) 7.1±0.50µs 7.2±0.60µs +1.41%
Array access (Compiler) 1729.5±76.26ns 1774.3±88.79ns +2.59%
Array access (Execution) 8.4±0.51µs 8.2±0.51µs -2.38%
Array access (Parser) 14.5±0.58µs 14.3±0.62µs -1.38%
Array creation (Compiler) 2.7±0.23µs 2.8±0.17µs +3.70%
Array creation (Execution) 1281.0±69.27µs 1209.8±84.01µs -5.56%
Array creation (Parser) 17.8±1.07µs 17.6±0.93µs -1.12%
Array pop (Compiler) 4.9±0.31µs 4.8±0.33µs -2.04%
Array pop (Execution) 634.3±31.27µs 638.1±35.31µs +0.60%
Array pop (Parser) 170.3±10.34µs 169.3±10.46µs -0.59%
Boolean Object Access (Compiler) 1312.9±67.16ns 1379.5±61.75ns +5.07%
Boolean Object Access (Execution) 5.2±0.24µs 4.9±0.21µs -5.77%
Boolean Object Access (Parser) 17.0±0.90µs 16.9±1.37µs -0.59%
Clean js (Compiler) 5.6±0.33µs 6.0±0.67µs +7.14%
Clean js (Execution) 692.5±44.14µs 745.3±93.14µs +7.62%
Clean js (Parser) 36.2±2.48µs 36.0±2.20µs -0.55%
Create Realm 264.2±16.63ns 254.7±12.40ns -3.60%
Dynamic Object Property Access (Compiler) 2.1±0.11µs 2.1±0.06µs 0.00%
Dynamic Object Property Access (Execution) 5.8±0.59µs 5.7±0.29µs -1.72%
Dynamic Object Property Access (Parser) 13.9±1.32µs 13.6±0.87µs -2.16%
Fibonacci (Compiler) 3.2±0.14µs 3.2±0.21µs 0.00%
Fibonacci (Execution) 1219.9±56.11µs 1265.9±64.28µs +3.77%
Fibonacci (Parser) 20.5±1.07µs 19.8±0.83µs -3.41%
For loop (Compiler) 3.0±0.14µs 3.1±0.15µs +3.33%
For loop (Execution) 19.5±0.96µs 19.1±0.98µs -2.05%
For loop (Parser) 18.3±1.15µs 18.0±1.24µs -1.64%
Mini js (Compiler) 5.1±0.58µs 5.0±0.30µs -1.96%
Mini js (Execution) 609.9±30.41µs 629.3±68.62µs +3.18%
Mini js (Parser) 31.7±1.92µs 31.6±1.93µs -0.32%
Number Object Access (Compiler) 1242.6±63.68ns 1381.7±65.70ns +11.19%
Number Object Access (Execution) 4.0±0.31µs 3.9±0.31µs -2.50%
Number Object Access (Parser) 13.3±0.70µs 13.0±0.64µs -2.26%
Object Creation (Compiler) 1877.0±131.75ns 1844.2±103.92ns -1.75%
Object Creation (Execution) 5.4±0.34µs 5.4±0.30µs 0.00%
Object Creation (Parser) 11.6±0.49µs 11.4±0.61µs -1.72%
RegExp (Compiler) 2.1±0.22µs 2.1±0.11µs 0.00%
RegExp (Execution) 14.5±0.71µs 14.3±0.70µs -1.38%
RegExp (Parser) 12.7±0.60µs 13.0±1.33µs +2.36%
RegExp Creation (Compiler) 1834.6±89.69ns 1881.9±163.39ns +2.58%
RegExp Creation (Execution) 10.1±0.64µs 9.9±0.78µs -1.98%
RegExp Creation (Parser) 10.5±0.55µs 10.3±0.64µs -1.90%
RegExp Literal (Compiler) 2.1±0.11µs 2.1±0.13µs 0.00%
RegExp Literal (Execution) 14.5±0.65µs 14.6±1.18µs +0.69%
RegExp Literal (Parser) 10.7±0.67µs 10.3±0.68µs -3.74%
RegExp Literal Creation (Compiler) 1841.6±93.96ns 1875.6±97.83ns +1.85%
RegExp Literal Creation (Execution) 9.9±0.58µs 9.5±0.45µs -4.04%
RegExp Literal Creation (Parser) 8.0±0.44µs 8.2±0.34µs +2.50%
Static Object Property Access (Compiler) 1886.9±103.77ns 1871.8±85.60ns -0.80%
Static Object Property Access (Execution) 5.7±0.69µs 5.4±0.29µs -5.26%
Static Object Property Access (Parser) 13.0±0.49µs 12.2±0.59µs -6.15%
String Object Access (Compiler) 1674.5±78.78ns 1722.8±116.66ns +2.88%
String Object Access (Execution) 7.0±0.39µs 7.0±0.30µs 0.00%
String Object Access (Parser) 16.4±0.96µs 16.2±0.88µs -1.22%
String comparison (Compiler) 2.8±0.24µs 2.7±0.11µs -3.57%
String comparison (Execution) 4.6±0.21µs 4.8±0.45µs +4.35%
String comparison (Parser) 13.9±0.77µs 13.5±0.67µs -2.88%
String concatenation (Compiler) 2.1±0.10µs 2.2±0.11µs +4.76%
String concatenation (Execution) 4.4±0.20µs 4.5±0.27µs +2.27%
String concatenation (Parser) 9.7±0.71µs 9.3±0.38µs -4.12%
String copy (Compiler) 1743.9±87.55ns 1762.6±100.54ns +1.07%
String copy (Execution) 4.2±0.20µs 4.3±0.26µs +2.38%
String copy (Parser) 7.1±0.34µs 7.3±0.57µs +2.82%
Symbols (Compiler) 1331.8±69.92ns 1364.0±91.01ns +2.42%
Symbols (Execution) 4.3±0.28µs 4.2±0.28µs -2.33%
Symbols (Parser) 5.7±0.36µs 5.5±0.44µs -3.51%

@jedel1043 jedel1043 marked this pull request as ready for review September 16, 2022 22:06
@jedel1043
Copy link
Member Author

Finished documenting and adding examples. Let me know if I overlooked something :)

@github-actions
Copy link

Benchmark for 60b54c3

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 504.2±0.99ns 517.7±0.79ns +2.68%
Arithmetic operations (Execution) 518.5±0.55ns 496.4±0.48ns -4.26%
Arithmetic operations (Parser) 6.6±0.02µs 6.8±0.08µs +3.03%
Array access (Compiler) 1471.6±6.95ns 1488.4±8.71ns +1.14%
Array access (Execution) 7.3±0.02µs 7.4±0.02µs +1.37%
Array access (Parser) 14.3±0.04µs 14.6±0.05µs +2.10%
Array creation (Compiler) 2.3±0.01µs 2.4±0.03µs +4.35%
Array creation (Execution) 1153.6±6.67µs 1119.8±7.16µs -2.93%
Array creation (Parser) 16.9±0.10µs 17.0±0.03µs +0.59%
Array pop (Compiler) 4.1±0.02µs 4.2±0.05µs +2.44%
Array pop (Execution) 624.9±7.37µs 610.0±2.94µs -2.38%
Array pop (Parser) 158.1±0.19µs 159.9±0.16µs +1.14%
Boolean Object Access (Compiler) 1159.8±2.27ns 1148.4±2.30ns -0.98%
Boolean Object Access (Execution) 4.6±0.07µs 4.5±0.01µs -2.17%
Boolean Object Access (Parser) 16.3±0.04µs 16.9±0.05µs +3.68%
Clean js (Compiler) 5.1±0.01µs 4.9±0.01µs -3.92%
Clean js (Execution) 626.4±19.41µs 617.9±2.41µs -1.36%
Clean js (Parser) 34.7±0.06µs 34.9±0.05µs +0.58%
Create Realm 236.4±0.32ns 240.2±0.36ns +1.61%
Dynamic Object Property Access (Compiler) 1811.6±8.23ns 1779.8±9.13ns -1.76%
Dynamic Object Property Access (Execution) 4.8±0.02µs 4.8±0.01µs 0.00%
Dynamic Object Property Access (Parser) 13.1±0.05µs 13.3±0.04µs +1.53%
Fibonacci (Compiler) 2.8±0.01µs 2.8±0.01µs 0.00%
Fibonacci (Execution) 1071.9±2.78µs 1149.9±3.25µs +7.28%
Fibonacci (Parser) 19.5±0.06µs 19.9±0.05µs +2.05%
For loop (Compiler) 2.7±0.01µs 2.6±0.01µs -3.70%
For loop (Execution) 16.3±0.04µs 16.4±0.08µs +0.61%
For loop (Parser) 17.5±0.07µs 17.3±0.04µs -1.14%
Mini js (Compiler) 4.5±0.02µs 4.3±0.01µs -4.44%
Mini js (Execution) 565.2±5.00µs 568.4±3.03µs +0.57%
Mini js (Parser) 30.4±0.07µs 30.3±0.04µs -0.33%
Number Object Access (Compiler) 1095.1±1.98ns 1086.1±5.10ns -0.82%
Number Object Access (Execution) 3.5±0.02µs 3.5±0.02µs 0.00%
Number Object Access (Parser) 12.9±0.05µs 13.2±0.02µs +2.33%
Object Creation (Compiler) 1580.9±3.91ns 1659.7±4.35ns +4.98%
Object Creation (Execution) 4.5±0.04µs 4.4±0.06µs -2.22%
Object Creation (Parser) 11.4±0.06µs 11.5±0.04µs +0.88%
RegExp (Compiler) 1768.4±5.56ns 1778.4±8.43ns +0.57%
RegExp (Execution) 11.6±0.03µs 11.5±0.03µs -0.86%
RegExp (Parser) 12.4±0.05µs 12.6±0.07µs +1.61%
RegExp Creation (Compiler) 1595.3±3.62ns 1607.4±5.69ns +0.76%
RegExp Creation (Execution) 8.5±0.02µs 8.6±0.02µs +1.18%
RegExp Creation (Parser) 10.4±0.04µs 10.4±0.03µs 0.00%
RegExp Literal (Compiler) 1787.5±9.24ns 1787.3±8.44ns -0.01%
RegExp Literal (Execution) 11.6±0.03µs 11.6±0.03µs 0.00%
RegExp Literal (Parser) 9.9±0.04µs 10.2±0.05µs +3.03%
RegExp Literal Creation (Compiler) 1594.3±4.30ns 1598.6±3.96ns +0.27%
RegExp Literal Creation (Execution) 8.5±0.02µs 8.6±0.02µs +1.18%
RegExp Literal Creation (Parser) 7.8±0.04µs 8.0±0.03µs +2.56%
Static Object Property Access (Compiler) 1609.9±3.96ns 1666.9±15.99ns +3.54%
Static Object Property Access (Execution) 4.6±0.05µs 4.6±0.03µs 0.00%
Static Object Property Access (Parser) 12.2±0.09µs 12.4±0.05µs +1.64%
String Object Access (Compiler) 1463.3±5.25ns 1474.8±5.86ns +0.79%
String Object Access (Execution) 6.2±0.02µs 6.3±0.02µs +1.61%
String Object Access (Parser) 16.1±0.05µs 16.5±0.06µs +2.48%
String comparison (Compiler) 2.4±0.01µs 2.3±0.01µs -4.17%
String comparison (Execution) 4.0±0.02µs 4.2±0.01µs +5.00%
String comparison (Parser) 13.6±0.06µs 13.6±0.09µs 0.00%
String concatenation (Compiler) 1766.8±10.39ns 1763.0±8.25ns -0.22%
String concatenation (Execution) 3.8±0.01µs 3.8±0.02µs 0.00%
String concatenation (Parser) 9.3±0.02µs 9.5±0.05µs +2.15%
String copy (Compiler) 1442.0±3.36ns 1444.0±3.36ns +0.14%
String copy (Execution) 3.5±0.01µs 3.5±0.01µs 0.00%
String copy (Parser) 7.3±0.03µs 7.3±0.04µs 0.00%
Symbols (Compiler) 1079.3±1.54ns 1073.7±3.11ns -0.52%
Symbols (Execution) 3.6±0.03µs 3.6±0.02µs 0.00%
Symbols (Parser) 5.5±0.05µs 5.6±0.03µs +1.82%

@github-actions
Copy link

Benchmark for 36078ec

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 635.5±10.24ns 654.7±6.60ns +3.02%
Arithmetic operations (Execution) 742.4±9.53ns 706.3±10.05ns -4.86%
Arithmetic operations (Parser) 6.9±0.12µs 7.0±0.11µs +1.45%
Array access (Compiler) 1687.7±22.21ns 1660.0±21.84ns -1.64%
Array access (Execution) 8.1±0.11µs 8.2±0.12µs +1.23%
Array access (Parser) 14.5±0.21µs 14.7±0.22µs +1.38%
Array creation (Compiler) 2.6±0.03µs 2.6±0.04µs 0.00%
Array creation (Execution) 1260.0±14.51µs 1409.9±93.28µs +11.90%
Array creation (Parser) 17.3±0.25µs 17.3±0.24µs 0.00%
Array pop (Compiler) 5.0±0.06µs 5.2±0.08µs +4.00%
Array pop (Execution) 656.6±11.40µs 691.1±10.58µs +5.25%
Array pop (Parser) 164.0±2.45µs 164.9±2.14µs +0.55%
Boolean Object Access (Compiler) 1216.9±16.56ns 1193.5±14.32ns -1.92%
Boolean Object Access (Execution) 4.9±0.06µs 4.9±0.09µs 0.00%
Boolean Object Access (Parser) 17.0±0.27µs 17.3±0.27µs +1.76%
Clean js (Compiler) 5.4±0.08µs 5.3±0.11µs -1.85%
Clean js (Execution) 685.3±10.65µs 712.6±10.23µs +3.98%
Clean js (Parser) 35.6±0.60µs 35.2±0.55µs -1.12%
Create Realm 266.8±4.04ns 276.6±11.50ns +3.67%
Dynamic Object Property Access (Compiler) 1950.9±30.72ns 1955.6±26.32ns +0.24%
Dynamic Object Property Access (Execution) 5.5±0.06µs 5.5±0.09µs 0.00%
Dynamic Object Property Access (Parser) 13.5±0.73µs 13.2±0.19µs -2.22%
Fibonacci (Compiler) 3.0±0.04µs 3.0±0.03µs 0.00%
Fibonacci (Execution) 1183.6±12.62µs 1211.8±15.98µs +2.38%
Fibonacci (Parser) 20.1±0.27µs 20.2±0.37µs +0.50%
For loop (Compiler) 2.9±0.04µs 2.9±0.12µs 0.00%
For loop (Execution) 18.6±0.27µs 18.6±0.35µs 0.00%
For loop (Parser) 17.9±0.37µs 17.9±0.26µs 0.00%
Mini js (Compiler) 4.8±0.07µs 4.8±0.07µs 0.00%
Mini js (Execution) 626.5±8.68µs 645.5±9.77µs +3.03%
Mini js (Parser) 30.6±0.43µs 30.6±0.43µs 0.00%
Number Object Access (Compiler) 1130.1±16.74ns 1136.9±13.78ns +0.60%
Number Object Access (Execution) 3.9±0.05µs 3.7±0.06µs -5.13%
Number Object Access (Parser) 13.4±0.21µs 13.6±0.19µs +1.49%
Object Creation (Compiler) 1729.8±16.80ns 1716.9±22.27ns -0.75%
Object Creation (Execution) 5.2±0.06µs 5.1±0.09µs -1.92%
Object Creation (Parser) 11.5±0.17µs 12.4±1.22µs +7.83%
RegExp (Compiler) 2.0±0.02µs 2.1±0.10µs +5.00%
RegExp (Execution) 13.2±0.19µs 13.4±0.21µs +1.52%
RegExp (Parser) 12.4±0.18µs 12.6±0.14µs +1.61%
RegExp Creation (Compiler) 1707.9±31.95ns 1750.8±80.25ns +2.51%
RegExp Creation (Execution) 10.1±0.14µs 10.1±0.12µs 0.00%
RegExp Creation (Parser) 10.4±0.17µs 10.5±0.15µs +0.96%
RegExp Literal (Compiler) 1992.2±42.93ns 1968.4±23.45ns -1.19%
RegExp Literal (Execution) 13.2±0.16µs 13.4±0.18µs +1.52%
RegExp Literal (Parser) 10.0±0.14µs 10.2±0.14µs +2.00%
RegExp Literal Creation (Compiler) 1942.5±164.58ns 1733.6±19.45ns -10.75%
RegExp Literal Creation (Execution) 10.0±0.19µs 10.1±0.14µs +1.00%
RegExp Literal Creation (Parser) 7.7±0.12µs 7.8±0.14µs +1.30%
Static Object Property Access (Compiler) 1807.3±87.14ns 1769.4±23.52ns -2.10%
Static Object Property Access (Execution) 5.3±0.06µs 5.4±0.08µs +1.89%
Static Object Property Access (Parser) 12.2±0.19µs 13.1±1.03µs +7.38%
String Object Access (Compiler) 1559.8±26.29ns 1554.8±26.97ns -0.32%
String Object Access (Execution) 7.1±0.07µs 7.0±0.10µs -1.41%
String Object Access (Parser) 16.9±0.16µs 16.9±0.25µs 0.00%
String comparison (Compiler) 2.6±0.04µs 2.6±0.05µs 0.00%
String comparison (Execution) 4.7±0.09µs 4.8±0.07µs +2.13%
String comparison (Parser) 13.6±0.21µs 13.5±0.17µs -0.74%
String concatenation (Compiler) 1987.5±24.27ns 1953.2±35.84ns -1.73%
String concatenation (Execution) 4.4±0.06µs 4.4±0.08µs 0.00%
String concatenation (Parser) 9.3±0.13µs 9.4±0.13µs +1.08%
String copy (Compiler) 1627.1±23.18ns 1618.5±27.58ns -0.53%
String copy (Execution) 4.0±0.07µs 4.1±0.07µs +2.50%
String copy (Parser) 6.9±0.14µs 7.0±0.10µs +1.45%
Symbols (Compiler) 1229.4±16.69ns 1200.5±18.35ns -2.35%
Symbols (Execution) 4.1±0.06µs 4.2±0.05µs +2.44%
Symbols (Parser) 5.7±0.58µs 5.4±0.09µs -5.26%

@github-actions
Copy link

Benchmark for 27963bf

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 658.8±32.12ns 687.1±53.52ns +4.30%
Arithmetic operations (Execution) 698.4±38.08ns 657.5±38.35ns -5.86%
Arithmetic operations (Parser) 6.9±0.27µs 7.2±0.33µs +4.35%
Array access (Compiler) 1993.8±147.48ns 1914.7±129.50ns -3.97%
Array access (Execution) 8.2±0.37µs 8.3±0.45µs +1.22%
Array access (Parser) 15.0±0.69µs 15.2±0.96µs +1.33%
Array creation (Compiler) 3.2±0.23µs 3.0±0.19µs -6.25%
Array creation (Execution) 1303.3±82.79µs 1317.8±100.07µs +1.11%
Array creation (Parser) 17.9±0.74µs 18.6±1.40µs +3.91%
Array pop (Compiler) 5.1±0.27µs 4.7±0.17µs -7.84%
Array pop (Execution) 638.5±29.17µs 656.9±45.19µs +2.88%
Array pop (Parser) 170.4±6.04µs 192.0±17.58µs +12.68%
Boolean Object Access (Compiler) 1356.9±69.90ns 1455.0±160.87ns +7.23%
Boolean Object Access (Execution) 5.3±0.31µs 5.0±0.29µs -5.66%
Boolean Object Access (Parser) 17.0±0.83µs 17.6±1.18µs +3.53%
Clean js (Compiler) 5.8±0.28µs 5.9±0.34µs +1.72%
Clean js (Execution) 692.0±21.91µs 711.6±38.50µs +2.83%
Clean js (Parser) 36.3±1.27µs 37.0±2.12µs +1.93%
Create Realm 285.7±14.95ns 257.4±11.65ns -9.91%
Dynamic Object Property Access (Compiler) 2.1±0.13µs 2.2±0.14µs +4.76%
Dynamic Object Property Access (Execution) 6.2±0.38µs 5.8±0.25µs -6.45%
Dynamic Object Property Access (Parser) 13.8±0.71µs 14.6±0.91µs +5.80%
Fibonacci (Compiler) 3.2±0.15µs 3.3±0.24µs +3.12%
Fibonacci (Execution) 1337.3±64.01µs 1232.8±60.01µs -7.81%
Fibonacci (Parser) 20.9±1.07µs 22.5±1.23µs +7.66%
For loop (Compiler) 3.2±0.16µs 3.1±0.16µs -3.13%
For loop (Execution) 19.2±0.95µs 19.6±0.81µs +2.08%
For loop (Parser) 18.1±1.26µs 18.2±1.91µs +0.55%
Mini js (Compiler) 5.2±0.26µs 5.2±0.29µs 0.00%
Mini js (Execution) 619.8±31.52µs 645.5±42.51µs +4.15%
Mini js (Parser) 31.6±2.07µs 32.0±1.58µs +1.27%
Number Object Access (Compiler) 1391.1±75.02ns 1295.8±85.57ns -6.85%
Number Object Access (Execution) 4.2±0.26µs 4.1±0.28µs -2.38%
Number Object Access (Parser) 13.6±0.87µs 13.8±1.16µs +1.47%
Object Creation (Compiler) 1949.4±134.60ns 1893.5±120.26ns -2.87%
Object Creation (Execution) 5.7±0.27µs 5.3±0.21µs -7.02%
Object Creation (Parser) 12.0±0.99µs 12.5±0.71µs +4.17%
RegExp (Compiler) 2.2±0.11µs 2.1±0.09µs -4.55%
RegExp (Execution) 13.7±0.78µs 13.7±0.82µs 0.00%
RegExp (Parser) 13.7±1.29µs 13.1±0.62µs -4.38%
RegExp Creation (Compiler) 2.0±0.19µs 1868.7±70.26ns -6.56%
RegExp Creation (Execution) 10.1±0.65µs 9.5±0.51µs -5.94%
RegExp Creation (Parser) 10.8±0.94µs 10.4±0.27µs -3.70%
RegExp Literal (Compiler) 2.2±0.17µs 2.1±0.09µs -4.55%
RegExp Literal (Execution) 14.0±0.91µs 13.4±0.57µs -4.29%
RegExp Literal (Parser) 10.5±0.54µs 10.6±0.73µs +0.95%
RegExp Literal Creation (Compiler) 1931.2±139.69ns 1882.7±74.40ns -2.51%
RegExp Literal Creation (Execution) 10.2±0.51µs 9.8±0.46µs -3.92%
RegExp Literal Creation (Parser) 8.1±0.60µs 7.9±0.30µs -2.47%
Static Object Property Access (Compiler) 1924.1±142.63ns 1912.6±109.48ns -0.60%
Static Object Property Access (Execution) 5.9±0.37µs 5.5±0.30µs -6.78%
Static Object Property Access (Parser) 12.8±0.52µs 12.6±0.54µs -1.56%
String Object Access (Compiler) 1681.6±71.73ns 1785.0±101.82ns +6.15%
String Object Access (Execution) 7.2±0.41µs 7.3±0.33µs +1.39%
String Object Access (Parser) 16.8±0.97µs 16.4±0.85µs -2.38%
String comparison (Compiler) 2.7±0.10µs 2.7±0.22µs 0.00%
String comparison (Execution) 4.9±0.40µs 4.8±0.22µs -2.04%
String comparison (Parser) 14.1±1.05µs 14.3±1.00µs +1.42%
String concatenation (Compiler) 2.2±0.17µs 2.1±0.08µs -4.55%
String concatenation (Execution) 4.5±0.27µs 4.5±0.20µs 0.00%
String concatenation (Parser) 9.5±0.38µs 10.0±1.36µs +5.26%
String copy (Compiler) 1741.5±106.72ns 1738.4±86.61ns -0.18%
String copy (Execution) 4.4±0.40µs 4.2±0.51µs -4.55%
String copy (Parser) 7.5±0.73µs 8.0±0.45µs +6.67%
Symbols (Compiler) 1434.8±56.38ns 1336.9±66.52ns -6.82%
Symbols (Execution) 4.3±0.20µs 4.2±0.28µs -2.33%
Symbols (Parser) 5.7±0.30µs 5.7±0.40µs 0.00%

@github-actions
Copy link

Benchmark for 607203e

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 528.4±0.92ns 534.3±1.11ns +1.12%
Arithmetic operations (Execution) 673.4±0.51ns 637.4±3.31ns -5.35%
Arithmetic operations (Parser) 6.4±0.02µs 6.4±0.01µs 0.00%
Array access (Compiler) 1404.6±12.99ns 1436.5±2.81ns +2.27%
Array access (Execution) 7.2±0.03µs 7.4±0.02µs +2.78%
Array access (Parser) 13.6±0.02µs 13.4±0.02µs -1.47%
Array creation (Compiler) 2.2±0.01µs 2.2±0.00µs 0.00%
Array creation (Execution) 1109.2±5.78µs 1139.7±3.59µs +2.75%
Array creation (Parser) 15.7±0.03µs 15.6±0.02µs -0.64%
Array pop (Compiler) 4.2±0.01µs 4.4±0.01µs +4.76%
Array pop (Execution) 579.8±1.55µs 592.7±2.38µs +2.22%
Array pop (Parser) 150.2±0.31µs 147.0±0.16µs -2.13%
Boolean Object Access (Compiler) 1123.4±1.76ns 1143.3±2.25ns +1.77%
Boolean Object Access (Execution) 4.3±0.04µs 4.1±0.01µs -4.65%
Boolean Object Access (Parser) 15.7±0.02µs 15.5±0.03µs -1.27%
Clean js (Compiler) 4.6±0.01µs 4.7±0.01µs +2.17%
Clean js (Execution) 605.0±3.29µs 624.8±3.12µs +3.27%
Clean js (Parser) 32.6±0.04µs 32.2±0.05µs -1.23%
Create Realm 235.4±4.27ns 254.4±12.23ns +8.07%
Dynamic Object Property Access (Compiler) 1666.5±4.39ns 1690.5±12.97ns +1.44%
Dynamic Object Property Access (Execution) 4.8±0.01µs 4.7±0.01µs -2.08%
Dynamic Object Property Access (Parser) 12.2±0.01µs 12.1±0.03µs -0.82%
Fibonacci (Compiler) 2.6±0.00µs 2.6±0.01µs 0.00%
Fibonacci (Execution) 1045.6±3.52µs 1036.5±2.64µs -0.87%
Fibonacci (Parser) 18.7±0.01µs 18.4±0.03µs -1.60%
For loop (Compiler) 2.5±0.01µs 2.4±0.00µs -4.00%
For loop (Execution) 16.6±0.03µs 16.5±0.03µs -0.60%
For loop (Parser) 16.0±0.03µs 16.1±0.03µs +0.63%
Mini js (Compiler) 4.0±0.01µs 4.1±0.02µs +2.50%
Mini js (Execution) 552.3±3.03µs 563.4±2.84µs +2.01%
Mini js (Parser) 28.4±0.05µs 28.3±0.02µs -0.35%
Number Object Access (Compiler) 1049.0±10.50ns 1063.2±1.86ns +1.35%
Number Object Access (Execution) 3.3±0.02µs 3.3±0.01µs 0.00%
Number Object Access (Parser) 12.4±0.03µs 12.1±0.01µs -2.42%
Object Creation (Compiler) 1478.3±8.52ns 1454.7±6.33ns -1.60%
Object Creation (Execution) 4.4±0.01µs 4.4±0.01µs 0.00%
Object Creation (Parser) 10.7±0.01µs 10.6±0.02µs -0.93%
RegExp (Compiler) 1653.7±4.01ns 1667.8±4.22ns +0.85%
RegExp (Execution) 11.2±0.23µs 11.8±0.04µs +5.36%
RegExp (Parser) 11.9±0.02µs 11.6±0.04µs -2.52%
RegExp Creation (Compiler) 1481.9±5.45ns 1493.7±4.35ns +0.80%
RegExp Creation (Execution) 8.1±0.02µs 8.8±0.03µs +8.64%
RegExp Creation (Parser) 9.8±0.01µs 9.7±0.02µs -1.02%
RegExp Literal (Compiler) 1652.0±4.70ns 1674.9±4.12ns +1.39%
RegExp Literal (Execution) 11.1±0.04µs 11.7±0.04µs +5.41%
RegExp Literal (Parser) 9.5±0.01µs 9.3±0.02µs -2.11%
RegExp Literal Creation (Compiler) 1480.7±5.99ns 1488.2±6.60ns +0.51%
RegExp Literal Creation (Execution) 8.2±0.02µs 8.8±0.04µs +7.32%
RegExp Literal Creation (Parser) 7.3±0.01µs 7.3±0.01µs 0.00%
Static Object Property Access (Compiler) 1484.1±9.33ns 1500.0±14.61ns +1.07%
Static Object Property Access (Execution) 4.6±0.01µs 4.6±0.02µs 0.00%
Static Object Property Access (Parser) 11.5±0.04µs 11.3±0.02µs -1.74%
String Object Access (Compiler) 1424.4±18.82ns 1420.8±4.26ns -0.25%
String Object Access (Execution) 6.1±0.02µs 6.1±0.03µs 0.00%
String Object Access (Parser) 15.3±0.03µs 15.1±0.02µs -1.31%
String comparison (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
String comparison (Execution) 4.0±0.02µs 4.1±0.02µs +2.50%
String comparison (Parser) 12.5±0.03µs 12.5±0.02µs 0.00%
String concatenation (Compiler) 1668.5±4.91ns 1683.1±4.18ns +0.88%
String concatenation (Execution) 3.8±0.01µs 3.8±0.01µs 0.00%
String concatenation (Parser) 8.8±0.01µs 8.7±0.07µs -1.14%
String copy (Compiler) 1354.2±4.92ns 1363.3±2.74ns +0.67%
String copy (Execution) 3.5±0.01µs 3.6±0.01µs +2.86%
String copy (Parser) 6.6±0.01µs 6.6±0.01µs 0.00%
Symbols (Compiler) 1016.0±5.03ns 1013.7±2.65ns -0.23%
Symbols (Execution) 3.5±0.02µs 3.5±0.01µs 0.00%
Symbols (Parser) 5.2±0.01µs 5.0±0.02µs -3.85%

@jedel1043 jedel1043 force-pushed the new_error branch 2 times, most recently from d99df0d to 0ebf10d Compare October 2, 2022 21:25
@jedel1043 jedel1043 requested a review from Razican October 2, 2022 21:26
@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Benchmark for 61aec7e

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 552.4±8.84ns 589.8±4.82ns +6.77%
Arithmetic operations (Execution) 648.3±0.82ns 643.8±0.50ns -0.69%
Arithmetic operations (Parser) 6.5±0.01µs 6.6±0.01µs +1.54%
Array access (Compiler) 1413.5±3.51ns 1423.1±4.16ns +0.68%
Array access (Execution) 7.1±0.03µs 7.1±0.03µs 0.00%
Array access (Parser) 13.6±0.02µs 13.9±0.04µs +2.21%
Array creation (Compiler) 2.2±0.00µs 2.2±0.00µs 0.00%
Array creation (Execution) 1173.7±4.38µs 1169.0±3.40µs -0.40%
Array creation (Parser) 15.8±0.03µs 16.2±0.04µs +2.53%
Array pop (Compiler) 4.2±0.01µs 4.4±0.01µs +4.76%
Array pop (Execution) 605.9±5.75µs 593.5±2.94µs -2.05%
Array pop (Parser) 149.6±0.19µs 148.8±0.12µs -0.53%
Boolean Object Access (Compiler) 1126.0±1.38ns 1129.9±2.00ns +0.35%
Boolean Object Access (Execution) 4.4±0.01µs 4.2±0.01µs -4.55%
Boolean Object Access (Parser) 16.1±0.03µs 16.3±0.02µs +1.24%
Clean js (Compiler) 4.6±0.01µs 4.6±0.01µs 0.00%
Clean js (Execution) 613.3±12.53µs 615.9±2.48µs +0.42%
Clean js (Parser) 32.9±0.03µs 33.3±0.11µs +1.22%
Create Realm 244.7±2.40ns 238.4±1.71ns -2.57%
Dynamic Object Property Access (Compiler) 1647.0±2.78ns 1678.3±4.14ns +1.90%
Dynamic Object Property Access (Execution) 4.8±0.02µs 4.8±0.05µs 0.00%
Dynamic Object Property Access (Parser) 12.4±0.02µs 12.5±0.01µs +0.81%
Fibonacci (Compiler) 2.6±0.00µs 2.6±0.01µs 0.00%
Fibonacci (Execution) 1037.9±1.15µs 1031.7±1.51µs -0.60%
Fibonacci (Parser) 18.7±0.18µs 19.0±0.02µs +1.60%
For loop (Compiler) 2.5±0.00µs 2.5±0.01µs 0.00%
For loop (Execution) 16.4±0.03µs 16.7±0.03µs +1.83%
For loop (Parser) 16.3±0.05µs 16.4±0.02µs +0.61%
Mini js (Compiler) 4.1±0.02µs 4.0±0.05µs -2.44%
Mini js (Execution) 554.2±3.39µs 560.8±3.07µs +1.19%
Mini js (Parser) 28.5±0.03µs 28.7±0.04µs +0.70%
Number Object Access (Compiler) 1072.5±3.96ns 1064.0±3.14ns -0.79%
Number Object Access (Execution) 3.3±0.00µs 3.2±0.01µs -3.03%
Number Object Access (Parser) 12.6±0.02µs 12.8±0.01µs +1.59%
Object Creation (Compiler) 1442.1±3.88ns 1464.3±4.21ns +1.54%
Object Creation (Execution) 4.4±0.01µs 4.4±0.01µs 0.00%
Object Creation (Parser) 10.9±0.02µs 10.9±0.02µs 0.00%
RegExp (Compiler) 1662.0±3.39ns 1657.9±3.78ns -0.25%
RegExp (Execution) 11.6±0.07µs 11.8±0.03µs +1.72%
RegExp (Parser) 11.9±0.03µs 11.9±0.01µs 0.00%
RegExp Creation (Compiler) 1492.2±3.35ns 1483.0±5.13ns -0.62%
RegExp Creation (Execution) 8.6±0.02µs 8.6±0.02µs 0.00%
RegExp Creation (Parser) 9.9±0.01µs 10.0±0.03µs +1.01%
RegExp Literal (Compiler) 1654.2±2.23ns 1656.1±3.48ns +0.11%
RegExp Literal (Execution) 11.6±0.03µs 11.8±0.04µs +1.72%
RegExp Literal (Parser) 9.6±0.09µs 9.6±0.01µs 0.00%
RegExp Literal Creation (Compiler) 1479.6±5.79ns 1488.2±6.19ns +0.58%
RegExp Literal Creation (Execution) 8.6±0.02µs 8.6±0.10µs 0.00%
RegExp Literal Creation (Parser) 7.5±0.04µs 7.5±0.01µs 0.00%
Static Object Property Access (Compiler) 1456.1±5.99ns 1497.7±5.24ns +2.86%
Static Object Property Access (Execution) 4.6±0.01µs 4.6±0.01µs 0.00%
Static Object Property Access (Parser) 11.6±0.02µs 11.6±0.02µs 0.00%
String Object Access (Compiler) 1416.8±6.73ns 1406.9±6.30ns -0.70%
String Object Access (Execution) 6.1±0.02µs 6.2±0.05µs +1.64%
String Object Access (Parser) 15.7±0.02µs 15.9±0.02µs +1.27%
String comparison (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
String comparison (Execution) 4.0±0.01µs 4.0±0.02µs 0.00%
String comparison (Parser) 12.7±0.04µs 12.7±0.02µs 0.00%
String concatenation (Compiler) 1661.8±2.97ns 1679.9±3.52ns +1.09%
String concatenation (Execution) 3.7±0.01µs 3.8±0.01µs +2.70%
String concatenation (Parser) 8.8±0.02µs 8.9±0.02µs +1.14%
String copy (Compiler) 1371.3±1.95ns 1364.9±7.98ns -0.47%
String copy (Execution) 3.5±0.01µs 3.5±0.01µs 0.00%
String copy (Parser) 6.7±0.01µs 6.7±0.01µs 0.00%
Symbols (Compiler) 1014.3±2.70ns 1015.6±3.54ns +0.13%
Symbols (Execution) 3.5±0.01µs 3.6±0.01µs +2.86%
Symbols (Parser) 5.3±0.02µs 5.3±0.01µs 0.00%

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Benchmark for 83de1d4

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 650.7±38.08ns 641.2±63.03ns -1.46%
Arithmetic operations (Execution) 663.7±54.11ns 636.3±95.39ns -4.13%
Arithmetic operations (Parser) 7.1±0.56µs 6.9±0.47µs -2.82%
Array access (Compiler) 1849.0±150.47ns 1836.7±160.66ns -0.67%
Array access (Execution) 8.4±0.65µs 8.2±0.69µs -2.38%
Array access (Parser) 14.9±1.35µs 14.6±1.06µs -2.01%
Array creation (Compiler) 2.7±0.16µs 2.7±0.16µs 0.00%
Array creation (Execution) 1176.5±91.66µs 1145.3±79.23µs -2.65%
Array creation (Parser) 17.6±1.08µs 16.8±1.16µs -4.55%
Array pop (Compiler) 4.9±0.35µs 4.7±0.29µs -4.08%
Array pop (Execution) 631.8±45.40µs 615.1±36.01µs -2.64%
Array pop (Parser) 161.6±13.32µs 161.9±13.05µs +0.19%
Boolean Object Access (Compiler) 1324.0±133.13ns 1360.2±106.65ns +2.73%
Boolean Object Access (Execution) 5.2±0.36µs 5.2±0.42µs 0.00%
Boolean Object Access (Parser) 17.0±1.47µs 17.3±1.34µs +1.76%
Clean js (Compiler) 5.7±0.55µs 5.4±0.35µs -5.26%
Clean js (Execution) 677.6±45.53µs 680.2±51.88µs +0.38%
Clean js (Parser) 37.3±3.29µs 36.0±3.38µs -3.49%
Create Realm 262.7±18.31ns 280.3±21.55ns +6.70%
Dynamic Object Property Access (Compiler) 2.1±0.17µs 2.1±0.14µs 0.00%
Dynamic Object Property Access (Execution) 5.9±0.64µs 5.7±0.42µs -3.39%
Dynamic Object Property Access (Parser) 14.1±1.30µs 13.2±1.03µs -6.38%
Fibonacci (Compiler) 3.1±0.18µs 3.1±0.20µs 0.00%
Fibonacci (Execution) 1209.7±74.86µs 1198.4±80.85µs -0.93%
Fibonacci (Parser) 20.9±1.37µs 20.4±1.39µs -2.39%
For loop (Compiler) 3.0±0.26µs 3.0±0.21µs 0.00%
For loop (Execution) 19.0±1.39µs 19.6±1.72µs +3.16%
For loop (Parser) 18.3±1.50µs 19.0±1.52µs +3.83%
Mini js (Compiler) 5.0±0.37µs 4.7±0.28µs -6.00%
Mini js (Execution) 585.2±33.13µs 588.9±84.14µs +0.63%
Mini js (Parser) 31.1±1.95µs 31.1±2.44µs 0.00%
Number Object Access (Compiler) 1222.1±61.23ns 1241.7±135.08ns +1.60%
Number Object Access (Execution) 3.8±0.28µs 3.8±0.29µs 0.00%
Number Object Access (Parser) 13.3±1.01µs 13.5±1.28µs +1.50%
Object Creation (Compiler) 1826.4±126.86ns 1809.6±216.29ns -0.92%
Object Creation (Execution) 5.3±0.37µs 5.4±0.40µs +1.89%
Object Creation (Parser) 12.1±1.16µs 11.4±0.81µs -5.79%
RegExp (Compiler) 2.1±0.17µs 2.1±0.19µs 0.00%
RegExp (Execution) 13.7±1.21µs 13.2±1.04µs -3.65%
RegExp (Parser) 12.7±0.94µs 12.4±0.95µs -2.36%
RegExp Creation (Compiler) 1850.7±108.01ns 1857.6±106.53ns +0.37%
RegExp Creation (Execution) 9.8±1.00µs 9.8±0.63µs 0.00%
RegExp Creation (Parser) 11.0±1.06µs 11.5±1.07µs +4.55%
RegExp Literal (Compiler) 1996.0±111.64ns 2.0±0.12µs +0.20%
RegExp Literal (Execution) 13.6±0.97µs 13.0±0.72µs -4.41%
RegExp Literal (Parser) 10.7±1.17µs 10.1±0.88µs -5.61%
RegExp Literal Creation (Compiler) 1837.8±139.17ns 1804.9±121.20ns -1.79%
RegExp Literal Creation (Execution) 9.8±1.09µs 9.6±0.67µs -2.04%
RegExp Literal Creation (Parser) 7.9±0.56µs 7.8±0.65µs -1.27%
Static Object Property Access (Compiler) 1845.9±119.39ns 1813.3±108.96ns -1.77%
Static Object Property Access (Execution) 6.2±0.44µs 5.5±0.36µs -11.29%
Static Object Property Access (Parser) 13.1±1.26µs 12.1±0.91µs -7.63%
String Object Access (Compiler) 1656.2±153.91ns 1618.1±106.66ns -2.30%
String Object Access (Execution) 7.1±0.75µs 7.0±0.42µs -1.41%
String Object Access (Parser) 16.6±1.49µs 16.7±1.16µs +0.60%
String comparison (Compiler) 2.6±0.18µs 2.6±0.17µs 0.00%
String comparison (Execution) 4.7±0.34µs 4.9±0.65µs +4.26%
String comparison (Parser) 13.5±0.87µs 13.9±1.03µs +2.96%
String concatenation (Compiler) 2.1±0.13µs 2.1±0.13µs 0.00%
String concatenation (Execution) 4.4±0.32µs 4.8±0.33µs +9.09%
String concatenation (Parser) 9.4±0.66µs 9.7±0.97µs +3.19%
String copy (Compiler) 1712.4±117.31ns 1735.5±185.41ns +1.35%
String copy (Execution) 4.3±0.37µs 4.1±0.20µs -4.65%
String copy (Parser) 7.1±0.59µs 7.0±0.76µs -1.41%
Symbols (Compiler) 1334.8±93.60ns 1334.2±94.83ns -0.04%
Symbols (Execution) 4.1±0.25µs 4.3±0.46µs +4.88%
Symbols (Parser) 5.7±0.36µs 5.5±0.36µs -3.51%

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.

This is ready for me :) thank you!

It only needs a re-base.

@github-actions
Copy link

Benchmark for 95b6f47

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 646.7±2.60ns 646.7±3.48ns 0.00%
Arithmetic operations (Execution) 777.2±3.79ns 763.4±0.60ns -1.78%
Arithmetic operations (Parser) 7.2±0.02µs 7.3±0.08µs +1.39%
Array access (Compiler) 1688.9±19.15ns 1669.4±8.46ns -1.15%
Array access (Execution) 8.8±0.03µs 8.4±0.05µs -4.55%
Array access (Parser) 14.8±0.16µs 15.2±0.11µs +2.70%
Array creation (Compiler) 2.6±0.02µs 2.6±0.03µs 0.00%
Array creation (Execution) 1405.6±5.42µs 1379.2±4.15µs -1.88%
Array creation (Parser) 17.7±0.24µs 17.7±0.18µs 0.00%
Array pop (Compiler) 4.9±0.07µs 5.2±0.04µs +6.12%
Array pop (Execution) 723.5±7.39µs 706.3±3.44µs -2.38%
Array pop (Parser) 167.2±1.51µs 167.9±0.94µs +0.42%
Boolean Object Access (Compiler) 1232.5±11.81ns 1222.5±17.68ns -0.81%
Boolean Object Access (Execution) 5.4±0.02µs 5.0±0.04µs -7.41%
Boolean Object Access (Parser) 17.9±0.14µs 18.2±0.17µs +1.68%
Clean js (Compiler) 5.4±0.03µs 5.3±0.05µs -1.85%
Clean js (Execution) 726.4±4.70µs 729.3±4.95µs +0.40%
Clean js (Parser) 36.1±0.36µs 36.5±0.26µs +1.11%
Create Realm 294.6±3.42ns 287.0±2.07ns -2.58%
Dynamic Object Property Access (Compiler) 1931.0±24.44ns 1950.5±13.61ns +1.01%
Dynamic Object Property Access (Execution) 5.8±0.02µs 5.6±0.06µs -3.45%
Dynamic Object Property Access (Parser) 13.7±0.12µs 13.8±0.02µs +0.73%
Fibonacci (Compiler) 3.0±0.03µs 3.0±0.03µs 0.00%
Fibonacci (Execution) 1257.5±2.71µs 1203.4±11.58µs -4.30%
Fibonacci (Parser) 20.7±0.27µs 21.0±0.13µs +1.45%
For loop (Compiler) 2.8±0.04µs 2.9±0.03µs +3.57%
For loop (Execution) 19.8±0.08µs 19.6±0.23µs -1.01%
For loop (Parser) 18.2±0.10µs 18.5±0.22µs +1.65%
Mini js (Compiler) 4.8±0.04µs 4.6±0.05µs -4.17%
Mini js (Execution) 664.1±5.62µs 661.9±5.75µs -0.33%
Mini js (Parser) 31.3±0.27µs 31.3±0.35µs 0.00%
Number Object Access (Compiler) 1146.1±10.16ns 1141.6±12.27ns -0.39%
Number Object Access (Execution) 4.0±0.01µs 3.9±0.02µs -2.50%
Number Object Access (Parser) 13.9±0.14µs 14.2±0.12µs +2.16%
Object Creation (Compiler) 1744.8±10.72ns 1719.1±14.64ns -1.47%
Object Creation (Execution) 5.4±0.02µs 5.2±0.05µs -3.70%
Object Creation (Parser) 11.9±0.13µs 11.9±0.06µs 0.00%
RegExp (Compiler) 1954.0±16.90ns 1936.1±18.67ns -0.92%
RegExp (Execution) 14.1±0.08µs 13.8±0.06µs -2.13%
RegExp (Parser) 13.0±0.14µs 13.1±0.07µs +0.77%
RegExp Creation (Compiler) 1763.2±16.60ns 1745.3±26.03ns -1.02%
RegExp Creation (Execution) 10.5±0.05µs 10.1±0.11µs -3.81%
RegExp Creation (Parser) 10.9±0.12µs 10.9±0.10µs 0.00%
RegExp Literal (Compiler) 1948.7±24.26ns 1934.3±17.49ns -0.74%
RegExp Literal (Execution) 14.1±0.08µs 13.8±0.06µs -2.13%
RegExp Literal (Parser) 10.4±0.09µs 10.5±0.05µs +0.96%
RegExp Literal Creation (Compiler) 1733.0±25.78ns 1712.1±18.92ns -1.21%
RegExp Literal Creation (Execution) 10.5±0.05µs 10.0±0.11µs -4.76%
RegExp Literal Creation (Parser) 8.2±0.07µs 8.2±0.04µs 0.00%
Static Object Property Access (Compiler) 1745.5±16.33ns 1743.6±16.46ns -0.11%
Static Object Property Access (Execution) 5.9±0.81µs 5.4±0.02µs -8.47%
Static Object Property Access (Parser) 12.8±0.12µs 12.7±0.13µs -0.78%
String Object Access (Compiler) 1573.0±10.88ns 1552.4±17.13ns -1.31%
String Object Access (Execution) 7.4±0.07µs 7.2±0.02µs -2.70%
String Object Access (Parser) 17.5±0.19µs 17.7±0.14µs +1.14%
String comparison (Compiler) 2.6±0.02µs 2.6±0.02µs 0.00%
String comparison (Execution) 4.8±0.02µs 4.8±0.03µs 0.00%
String comparison (Parser) 14.0±0.08µs 14.1±0.08µs +0.71%
String concatenation (Compiler) 1989.1±27.74ns 1987.3±12.50ns -0.09%
String concatenation (Execution) 4.5±0.03µs 4.5±0.02µs 0.00%
String concatenation (Parser) 9.6±0.07µs 9.7±0.07µs +1.04%
String copy (Compiler) 1606.2±26.16ns 1593.9±15.46ns -0.77%
String copy (Execution) 4.3±0.02µs 4.2±0.04µs -2.33%
String copy (Parser) 7.1±0.06µs 7.2±0.05µs +1.41%
Symbols (Compiler) 1187.8±11.58ns 1200.8±10.54ns +1.09%
Symbols (Execution) 4.3±0.02µs 4.2±0.05µs -2.33%
Symbols (Parser) 5.7±0.06µs 5.7±0.04µs 0.00%

@github-actions
Copy link

Benchmark for cbbdae0

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 640.1±48.56ns 605.8±40.53ns -5.36%
Arithmetic operations (Execution) 724.3±47.36ns 619.4±52.07ns -14.48%
Arithmetic operations (Parser) 7.1±0.51µs 7.1±0.56µs 0.00%
Array access (Compiler) 1705.7±119.15ns 1731.6±135.42ns +1.52%
Array access (Execution) 10.7±1.08µs 10.6±0.85µs -0.93%
Array access (Parser) 16.0±1.42µs 14.4±1.08µs -10.00%
Array creation (Compiler) 2.6±0.19µs 2.8±0.19µs +7.69%
Array creation (Execution) 1325.2±105.22µs 1329.1±93.97µs +0.29%
Array creation (Parser) 17.8±1.09µs 17.5±1.22µs -1.69%
Array pop (Compiler) 4.6±0.36µs 4.8±0.40µs +4.35%
Array pop (Execution) 812.0±54.54µs 803.0±51.42µs -1.11%
Array pop (Parser) 169.6±16.20µs 181.0±13.66µs +6.72%
Boolean Object Access (Compiler) 1377.9±115.03ns 1373.2±95.34ns -0.34%
Boolean Object Access (Execution) 6.8±0.40µs 6.3±0.39µs -7.35%
Boolean Object Access (Parser) 17.3±1.36µs 18.0±1.65µs +4.05%
Clean js (Compiler) 5.8±0.38µs 5.9±0.36µs +1.72%
Clean js (Execution) 826.7±54.57µs 821.2±54.11µs -0.67%
Clean js (Parser) 37.8±2.42µs 35.9±2.88µs -5.03%
Create Realm 265.6±23.64ns 279.3±23.44ns +5.16%
Dynamic Object Property Access (Compiler) 2.2±0.15µs 2.2±0.16µs 0.00%
Dynamic Object Property Access (Execution) 6.2±0.42µs 6.3±0.49µs +1.61%
Dynamic Object Property Access (Parser) 13.7±1.01µs 13.1±0.95µs -4.38%
Fibonacci (Compiler) 3.4±0.19µs 3.2±0.26µs -5.88%
Fibonacci (Execution) 1419.0±87.72µs 1356.2±102.40µs -4.43%
Fibonacci (Parser) 22.1±1.33µs 21.3±1.93µs -3.62%
For loop (Compiler) 3.1±0.19µs 3.0±0.23µs -3.23%
For loop (Execution) 20.2±1.21µs 22.3±1.61µs +10.40%
For loop (Parser) 18.8±1.36µs 17.1±1.47µs -9.04%
Mini js (Compiler) 4.8±0.35µs 4.7±0.35µs -2.08%
Mini js (Execution) 786.7±63.20µs 763.6±58.67µs -2.94%
Mini js (Parser) 32.0±2.93µs 31.0±2.14µs -3.12%
Number Object Access (Compiler) 1228.4±86.51ns 1241.1±89.54ns +1.03%
Number Object Access (Execution) 5.0±0.34µs 5.0±0.38µs 0.00%
Number Object Access (Parser) 14.1±0.87µs 13.8±0.96µs -2.13%
Object Creation (Compiler) 1836.8±147.91ns 1865.3±140.68ns +1.55%
Object Creation (Execution) 6.1±0.45µs 6.2±0.37µs +1.64%
Object Creation (Parser) 12.3±0.94µs 11.5±0.98µs -6.50%
RegExp (Compiler) 2.1±0.16µs 2.0±0.14µs -4.76%
RegExp (Execution) 16.1±1.31µs 16.7±1.30µs +3.73%
RegExp (Parser) 13.5±1.11µs 12.6±1.03µs -6.67%
RegExp Creation (Compiler) 1905.8±165.09ns 1907.0±149.57ns +0.06%
RegExp Creation (Execution) 11.3±1.87µs 11.8±0.76µs +4.42%
RegExp Creation (Parser) 10.6±0.77µs 10.7±0.91µs +0.94%
RegExp Literal (Compiler) 2.1±0.15µs 2.1±0.16µs 0.00%
RegExp Literal (Execution) 16.2±1.04µs 16.4±1.28µs +1.23%
RegExp Literal (Parser) 10.8±0.85µs 10.4±0.85µs -3.70%
RegExp Literal Creation (Compiler) 1922.9±166.15ns 1916.2±110.00ns -0.35%
RegExp Literal Creation (Execution) 11.7±0.71µs 11.4±1.03µs -2.56%
RegExp Literal Creation (Parser) 8.4±0.69µs 8.1±0.58µs -3.57%
Static Object Property Access (Compiler) 1966.5±131.20ns 1855.5±115.58ns -5.64%
Static Object Property Access (Execution) 6.4±1.74µs 6.3±0.44µs -1.56%
Static Object Property Access (Parser) 13.1±0.70µs 12.6±1.63µs -3.82%
String Object Access (Compiler) 1622.7±127.87ns 1818.9±126.98ns +12.09%
String Object Access (Execution) 8.9±0.67µs 9.5±0.54µs +6.74%
String Object Access (Parser) 17.4±1.50µs 17.8±1.47µs +2.30%
String comparison (Compiler) 2.7±0.19µs 2.6±0.19µs -3.70%
String comparison (Execution) 5.8±0.31µs 5.4±0.39µs -6.90%
String comparison (Parser) 15.0±0.90µs 14.1±1.02µs -6.00%
String concatenation (Compiler) 2.1±0.17µs 2.1±0.15µs 0.00%
String concatenation (Execution) 5.2±0.33µs 5.3±0.41µs +1.92%
String concatenation (Parser) 9.9±0.92µs 9.7±0.78µs -2.02%
String copy (Compiler) 1823.1±128.70ns 1737.3±124.00ns -4.71%
String copy (Execution) 5.0±0.43µs 4.7±0.35µs -6.00%
String copy (Parser) 7.6±0.55µs 7.0±0.56µs -7.89%
Symbols (Compiler) 1436.1±85.88ns 1312.0±87.35ns -8.64%
Symbols (Execution) 5.0±0.26µs 5.0±0.35µs 0.00%
Symbols (Parser) 5.5±0.46µs 5.5±0.45µs 0.00%

Fix detection of Test262Error in boa_tester

cargo update
Add doc examples

Remove unnecessary whitespace in example
@github-actions
Copy link

Benchmark for 8339f70

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 642.9±27.88ns 688.6±35.34ns +7.11%
Arithmetic operations (Execution) 794.1±32.12ns 722.6±27.57ns -9.00%
Arithmetic operations (Parser) 7.3±0.25µs 7.3±0.30µs 0.00%
Array access (Compiler) 1935.1±99.09ns 2.1±1.03µs +8.52%
Array access (Execution) 11.5±0.43µs 11.5±0.38µs 0.00%
Array access (Parser) 16.1±1.32µs 15.7±0.58µs -2.48%
Array creation (Compiler) 2.9±0.12µs 2.9±0.17µs 0.00%
Array creation (Execution) 1502.8±66.57µs 1521.0±94.27µs +1.21%
Array creation (Parser) 19.7±1.46µs 19.8±1.45µs +0.51%
Array pop (Compiler) 5.1±0.21µs 5.0±0.26µs -1.96%
Array pop (Execution) 902.3±41.62µs 921.5±31.78µs +2.13%
Array pop (Parser) 177.6±10.44µs 177.1±15.45µs -0.28%
Boolean Object Access (Compiler) 1459.1±98.01ns 1409.7±69.48ns -3.39%
Boolean Object Access (Execution) 6.9±0.33µs 7.0±0.49µs +1.45%
Boolean Object Access (Parser) 19.3±1.53µs 19.1±0.82µs -1.04%
Clean js (Compiler) 6.0±0.35µs 6.1±0.23µs +1.67%
Clean js (Execution) 903.8±30.00µs 918.7±32.85µs +1.65%
Clean js (Parser) 40.6±3.79µs 40.7±2.54µs +0.25%
Create Realm 339.2±13.58ns 297.7±20.50ns -12.23%
Dynamic Object Property Access (Compiler) 2.3±0.13µs 2.3±0.15µs 0.00%
Dynamic Object Property Access (Execution) 7.0±0.33µs 6.9±0.32µs -1.43%
Dynamic Object Property Access (Parser) 14.8±0.75µs 14.5±0.60µs -2.03%
Fibonacci (Compiler) 3.5±0.15µs 3.4±0.14µs -2.86%
Fibonacci (Execution) 1466.0±64.04µs 1470.4±54.79µs +0.30%
Fibonacci (Parser) 22.7±1.45µs 22.3±0.89µs -1.76%
For loop (Compiler) 3.3±0.14µs 3.3±0.19µs 0.00%
For loop (Execution) 22.5±1.08µs 21.8±1.02µs -3.11%
For loop (Parser) 19.7±0.80µs 20.1±0.94µs +2.03%
Mini js (Compiler) 5.2±0.26µs 5.4±0.42µs +3.85%
Mini js (Execution) 843.4±42.38µs 835.4±54.08µs -0.95%
Mini js (Parser) 34.5±1.64µs 35.2±4.42µs +2.03%
Number Object Access (Compiler) 1333.5±70.21ns 1328.1±68.98ns -0.40%
Number Object Access (Execution) 5.3±0.37µs 5.3±0.23µs 0.00%
Number Object Access (Parser) 15.0±1.02µs 14.8±0.87µs -1.33%
Object Creation (Compiler) 1990.1±98.28ns 2.0±0.14µs +0.50%
Object Creation (Execution) 6.5±0.37µs 6.5±0.33µs 0.00%
Object Creation (Parser) 12.7±0.70µs 13.1±2.10µs +3.15%
RegExp (Compiler) 2.4±0.56µs 2.3±0.12µs -4.17%
RegExp (Execution) 18.1±0.68µs 18.1±1.35µs 0.00%
RegExp (Parser) 13.9±0.58µs 13.7±0.53µs -1.44%
RegExp Creation (Compiler) 2.1±0.15µs 2.1±0.14µs 0.00%
RegExp Creation (Execution) 12.3±0.59µs 12.0±0.62µs -2.44%
RegExp Creation (Parser) 11.9±0.79µs 11.5±0.51µs -3.36%
RegExp Literal (Compiler) 2.3±0.07µs 2.3±0.25µs 0.00%
RegExp Literal (Execution) 18.2±0.94µs 18.2±1.25µs 0.00%
RegExp Literal (Parser) 11.2±0.43µs 11.1±0.76µs -0.89%
RegExp Literal Creation (Compiler) 2.1±0.11µs 2.1±0.09µs 0.00%
RegExp Literal Creation (Execution) 12.3±1.01µs 12.0±0.55µs -2.44%
RegExp Literal Creation (Parser) 9.0±1.01µs 8.9±0.67µs -1.11%
Static Object Property Access (Compiler) 2.1±0.09µs 2.0±0.08µs -4.76%
Static Object Property Access (Execution) 6.8±0.36µs 6.8±0.49µs 0.00%
Static Object Property Access (Parser) 13.7±0.64µs 13.5±0.58µs -1.46%
String Object Access (Compiler) 1829.6±98.17ns 1823.0±78.15ns -0.36%
String Object Access (Execution) 9.6±0.36µs 10.1±0.59µs +5.21%
String Object Access (Parser) 19.0±0.83µs 19.0±2.18µs 0.00%
String comparison (Compiler) 3.0±0.13µs 3.0±0.14µs 0.00%
String comparison (Execution) 5.8±0.26µs 5.6±0.37µs -3.45%
String comparison (Parser) 15.6±1.94µs 15.2±0.89µs -2.56%
String concatenation (Compiler) 2.3±0.11µs 2.3±0.09µs 0.00%
String concatenation (Execution) 5.4±0.26µs 5.4±0.35µs 0.00%
String concatenation (Parser) 10.5±0.48µs 10.5±0.49µs 0.00%
String copy (Compiler) 1899.5±109.59ns 1914.9±116.92ns +0.81%
String copy (Execution) 5.1±0.25µs 5.0±0.33µs -1.96%
String copy (Parser) 7.9±0.40µs 7.8±0.40µs -1.27%
Symbols (Compiler) 1456.5±75.44ns 1447.6±57.63ns -0.61%
Symbols (Execution) 5.2±0.32µs 5.2±0.26µs 0.00%
Symbols (Parser) 6.1±0.22µs 6.2±0.28µs +1.64%

@github-actions
Copy link

Benchmark for 6beb20c

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 473.3±1.11ns 488.9±1.19ns +3.30%
Arithmetic operations (Execution) 549.1±0.62ns 495.5±0.30ns -9.76%
Arithmetic operations (Parser) 6.5±0.06µs 6.5±0.05µs 0.00%
Array access (Compiler) 1446.7±5.91ns 1484.6±4.34ns +2.62%
Array access (Execution) 9.8±0.03µs 9.7±0.05µs -1.02%
Array access (Parser) 14.7±0.05µs 14.5±0.10µs -1.36%
Array creation (Compiler) 2.3±0.00µs 2.4±0.03µs +4.35%
Array creation (Execution) 1313.3±2.28µs 1369.3±3.31µs +4.26%
Array creation (Parser) 17.3±0.06µs 17.1±0.04µs -1.16%
Array pop (Compiler) 4.1±0.01µs 4.5±0.05µs +9.76%
Array pop (Execution) 828.8±6.22µs 841.3±2.15µs +1.51%
Array pop (Parser) 150.2±0.19µs 154.3±0.22µs +2.73%
Boolean Object Access (Compiler) 1134.5±1.44ns 1168.0±5.34ns +2.95%
Boolean Object Access (Execution) 5.7±0.01µs 5.8±0.01µs +1.75%
Boolean Object Access (Parser) 17.4±0.04µs 17.1±0.04µs -1.72%
Clean js (Compiler) 5.0±0.01µs 4.8±0.01µs -4.00%
Clean js (Execution) 789.8±4.76µs 786.3±3.29µs -0.44%
Clean js (Parser) 35.6±0.10µs 35.3±0.05µs -0.84%
Create Realm 245.4±0.27ns 252.7±2.23ns +2.97%
Dynamic Object Property Access (Compiler) 1793.7±9.43ns 1927.2±25.81ns +7.44%
Dynamic Object Property Access (Execution) 5.5±0.02µs 5.5±0.02µs 0.00%
Dynamic Object Property Access (Parser) 13.1±0.05µs 13.0±0.04µs -0.76%
Fibonacci (Compiler) 2.8±0.01µs 2.8±0.01µs 0.00%
Fibonacci (Execution) 1218.9±7.33µs 1167.4±2.11µs -4.23%
Fibonacci (Parser) 20.4±0.07µs 20.3±0.29µs -0.49%
For loop (Compiler) 2.6±0.01µs 2.7±0.03µs +3.85%
For loop (Execution) 17.4±0.05µs 17.0±0.03µs -2.30%
For loop (Parser) 17.7±0.08µs 17.5±0.03µs -1.13%
Mini js (Compiler) 4.2±0.02µs 4.4±0.02µs +4.76%
Mini js (Execution) 734.2±5.59µs 731.6±3.75µs -0.35%
Mini js (Parser) 30.6±0.10µs 30.5±0.04µs -0.33%
Number Object Access (Compiler) 1052.8±2.15ns 1098.2±2.34ns +4.31%
Number Object Access (Execution) 4.5±0.03µs 4.3±0.05µs -4.44%
Number Object Access (Parser) 13.4±0.03µs 13.3±0.02µs -0.75%
Object Creation (Compiler) 1551.7±4.23ns 1652.5±24.11ns +6.50%
Object Creation (Execution) 5.2±0.01µs 5.2±0.02µs 0.00%
Object Creation (Parser) 11.7±0.06µs 11.6±0.06µs -0.85%
RegExp (Compiler) 1761.0±12.35ns 1833.8±12.87ns +4.13%
RegExp (Execution) 14.8±0.05µs 15.0±0.05µs +1.35%
RegExp (Parser) 12.6±0.06µs 12.5±0.06µs -0.79%
RegExp Creation (Compiler) 1572.0±4.73ns 1625.7±20.87ns +3.42%
RegExp Creation (Execution) 10.0±0.03µs 10.0±0.04µs 0.00%
RegExp Creation (Parser) 10.6±0.06µs 10.5±0.15µs -0.94%
RegExp Literal (Compiler) 1750.5±3.94ns 1917.2±20.03ns +9.52%
RegExp Literal (Execution) 14.8±0.05µs 14.9±0.06µs +0.68%
RegExp Literal (Parser) 10.2±0.04µs 10.0±0.02µs -1.96%
RegExp Literal Creation (Compiler) 1580.7±3.17ns 1638.8±12.29ns +3.68%
RegExp Literal Creation (Execution) 10.0±0.03µs 10.0±0.03µs 0.00%
RegExp Literal Creation (Parser) 8.2±0.03µs 8.1±0.03µs -1.22%
Static Object Property Access (Compiler) 1587.0±3.18ns 1690.4±26.99ns +6.52%
Static Object Property Access (Execution) 5.4±0.02µs 5.3±0.02µs -1.85%
Static Object Property Access (Parser) 12.6±0.06µs 12.4±0.07µs -1.59%
String Object Access (Compiler) 1447.4±4.47ns 1524.3±4.89ns +5.31%
String Object Access (Execution) 8.3±0.02µs 8.0±0.06µs -3.61%
String Object Access (Parser) 16.7±0.04µs 16.6±0.03µs -0.60%
String comparison (Compiler) 2.4±0.01µs 2.4±0.04µs 0.00%
String comparison (Execution) 4.8±0.01µs 4.6±0.01µs -4.17%
String comparison (Parser) 13.7±0.09µs 13.5±0.05µs -1.46%
String concatenation (Compiler) 1806.6±10.51ns 1897.7±18.84ns +5.04%
String concatenation (Execution) 4.4±0.01µs 4.4±0.02µs 0.00%
String concatenation (Parser) 9.7±0.11µs 9.5±0.03µs -2.06%
String copy (Compiler) 1435.7±6.40ns 1553.5±32.35ns +8.21%
String copy (Execution) 4.2±0.02µs 4.1±0.02µs -2.38%
String copy (Parser) 7.3±0.04µs 7.2±0.03µs -1.37%
Symbols (Compiler) 1048.3±2.23ns 1071.2±2.41ns +2.18%
Symbols (Execution) 4.3±0.02µs 4.2±0.01µs -2.33%
Symbols (Parser) 5.7±0.04µs 5.7±0.05µs 0.00%

@jedel1043 jedel1043 requested a review from RageKnify October 19, 2022 18:56
Copy link
Contributor

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

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

I've gone through the 3 main files and a few of the other ones to get a feel for what the changes look like and I think it looks great, only had that nitpick with the documentation. Great job, seems like a really cool change.

@jedel1043
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Oct 19, 2022
This is an experiment that tries to migrate the codebase from eager `Error` objects to lazy ones.

In short words, this redefines `JsResult = Result<JsValue, JsError>`, where `JsError` is a brand new type that stores only the essential part of an error type, and only transforms those errors to `JsObject`s on demand (when having to pass them as arguments to functions or store them inside async/generators).

This change is pretty big, because it unblocks a LOT of code from having to take a `&mut Context` on each call. It also paves the road for possibly making `JsError` a proper variant of `JsValue`, which can be a pretty big optimization for try/catch.

A downside of this is that it exposes some brand new error types to our public API. However, we can now implement `Error` on `JsError`, making our `JsResult` type a bit more inline with Rust's best practices.

~Will mark this as draft, since it's missing some documentation and a lot of examples, but~ it's pretty much feature complete. As always, any comments about the design are very much appreciated!

Note: Since there are a lot of changes which are essentially just rewriting `context.throw` to `JsNativeError::%type%`, I'll leave an "index" of the most important changes here:

- [boa_engine/src/error.rs](https://github.com/boa-dev/boa/pull/2283/files#diff-f15f2715655440626eefda5c46193d29856f4949ad37380c129a8debc6b82f26)
- [boa_engine/src/builtins/error/mod.rs](https://github.com/boa-dev/boa/pull/2283/files#diff-3eb1e4b4b5c7210eb98192a5277f5a239148423c6b970c4ae05d1b267f8f1084)
- [boa_tester/src/exec/mod.rs](https://github.com/boa-dev/boa/pull/2283/files#diff-fc3d7ad7b5e64574258c9febbe56171f3309b74e0c8da35238a76002f3ee34d9)
@github-actions
Copy link

Benchmark for d9361d9

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 570.1±5.33ns 630.5±1.65ns +10.59%
Arithmetic operations (Execution) 815.6±2.91ns 728.5±6.11ns -10.68%
Arithmetic operations (Parser) 6.8±0.02µs 6.8±0.08µs 0.00%
Array access (Compiler) 1633.4±8.98ns 1666.7±3.86ns +2.04%
Array access (Execution) 10.9±0.06µs 11.0±0.13µs +0.92%
Array access (Parser) 14.8±0.23µs 14.5±0.07µs -2.03%
Array creation (Compiler) 2.5±0.01µs 2.6±0.01µs +4.00%
Array creation (Execution) 1550.4±8.85µs 1600.2±6.27µs +3.21%
Array creation (Parser) 17.7±0.13µs 17.4±0.04µs -1.69%
Array pop (Compiler) 4.8±0.01µs 5.1±0.02µs +6.25%
Array pop (Execution) 918.2±2.10µs 911.1±1.47µs -0.77%
Array pop (Parser) 159.7±0.89µs 162.2±0.19µs +1.57%
Boolean Object Access (Compiler) 1170.4±3.38ns 1194.7±15.25ns +2.08%
Boolean Object Access (Execution) 6.4±0.03µs 6.4±0.03µs 0.00%
Boolean Object Access (Parser) 17.9±0.03µs 17.8±0.37µs -0.56%
Clean js (Compiler) 5.3±0.04µs 5.3±0.02µs 0.00%
Clean js (Execution) 874.5±13.59µs 879.7±4.67µs +0.59%
Clean js (Parser) 36.0±0.06µs 35.8±0.18µs -0.56%
Create Realm 290.3±3.61ns 290.5±7.31ns +0.07%
Dynamic Object Property Access (Compiler) 1942.9±6.31ns 2.0±0.02µs +2.94%
Dynamic Object Property Access (Execution) 6.4±0.05µs 6.4±0.02µs 0.00%
Dynamic Object Property Access (Parser) 13.2±0.03µs 13.1±0.07µs -0.76%
Fibonacci (Compiler) 3.0±0.01µs 3.0±0.03µs 0.00%
Fibonacci (Execution) 1331.3±3.78µs 1329.0±3.51µs -0.17%
Fibonacci (Parser) 20.7±0.16µs 20.5±0.09µs -0.97%
For loop (Compiler) 2.8±0.01µs 2.9±0.04µs +3.57%
For loop (Execution) 20.7±0.08µs 20.6±0.05µs -0.48%
For loop (Parser) 18.2±0.13µs 18.1±0.28µs -0.55%
Mini js (Compiler) 4.7±0.03µs 4.8±0.02µs +2.13%
Mini js (Execution) 813.8±10.59µs 818.5±5.74µs +0.58%
Mini js (Parser) 30.9±0.04µs 30.5±0.34µs -1.29%
Number Object Access (Compiler) 1117.2±2.46ns 1133.3±2.31ns +1.44%
Number Object Access (Execution) 4.8±0.05µs 4.9±0.02µs +2.08%
Number Object Access (Parser) 13.8±0.10µs 13.7±0.15µs -0.72%
Object Creation (Compiler) 1700.4±6.53ns 1786.2±22.88ns +5.05%
Object Creation (Execution) 5.9±0.02µs 6.0±0.01µs +1.69%
Object Creation (Parser) 11.7±0.22µs 11.6±0.27µs -0.85%
RegExp (Compiler) 1945.6±7.32ns 1993.0±11.40ns +2.44%
RegExp (Execution) 16.6±0.06µs 17.0±0.06µs +2.41%
RegExp (Parser) 12.8±0.02µs 12.5±0.07µs -2.34%
RegExp Creation (Compiler) 1730.0±5.48ns 1802.2±17.61ns +4.17%
RegExp Creation (Execution) 11.2±0.06µs 11.4±0.07µs +1.79%
RegExp Creation (Parser) 10.8±0.06µs 10.6±0.15µs -1.85%
RegExp Literal (Compiler) 1935.7±7.30ns 2.0±0.01µs +3.32%
RegExp Literal (Execution) 16.6±0.16µs 16.9±0.13µs +1.81%
RegExp Literal (Parser) 10.2±0.02µs 10.0±0.07µs -1.96%
RegExp Literal Creation (Compiler) 1731.5±4.91ns 1814.3±16.79ns +4.78%
RegExp Literal Creation (Execution) 11.2±0.06µs 11.4±0.05µs +1.79%
RegExp Literal Creation (Parser) 8.2±0.01µs 8.0±0.03µs -2.44%
Static Object Property Access (Compiler) 1728.6±7.25ns 1780.6±20.74ns +3.01%
Static Object Property Access (Execution) 6.2±0.01µs 6.3±0.02µs +1.61%
Static Object Property Access (Parser) 12.6±0.05µs 12.4±0.02µs -1.59%
String Object Access (Compiler) 1544.0±8.32ns 1602.2±6.10ns +3.77%
String Object Access (Execution) 8.9±0.05µs 9.1±0.08µs +2.25%
String Object Access (Parser) 17.3±0.03µs 17.3±0.16µs 0.00%
String comparison (Compiler) 2.6±0.01µs 2.7±0.00µs +3.85%
String comparison (Execution) 5.3±0.05µs 5.4±0.02µs +1.89%
String comparison (Parser) 13.9±0.19µs 13.7±0.10µs -1.44%
String concatenation (Compiler) 2.0±0.03µs 2.1±0.01µs +5.00%
String concatenation (Execution) 5.0±0.02µs 5.1±0.02µs +2.00%
String concatenation (Parser) 9.6±0.02µs 9.5±0.02µs -1.04%
String copy (Compiler) 1602.0±3.56ns 1741.4±20.40ns +8.70%
String copy (Execution) 4.7±0.04µs 4.8±0.05µs +2.13%
String copy (Parser) 7.1±0.03µs 7.0±0.07µs -1.41%
Symbols (Compiler) 1188.8±8.47ns 1202.9±23.45ns +1.19%
Symbols (Execution) 4.7±0.03µs 4.8±0.04µs +2.13%
Symbols (Parser) 5.6±0.04µs 5.4±0.08µs -3.57%

@bors
Copy link

bors bot commented Oct 19, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Create new lazy Error type [Merged by Bors] - Create new lazy Error type Oct 19, 2022
@bors bors bot closed this Oct 19, 2022
@bors bors bot deleted the new_error branch October 19, 2022 19:36
@bcr bcr mentioned this pull request Oct 26, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API discussion Issues needing more discussion enhancement New feature or request execution Issues or PRs related to code execution performance Performance related changes and issues run-benchmark Label used to run banchmarks on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants