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

Bytecode Interpreter (new branch) #860

Merged
merged 9 commits into from
Jan 2, 2021
Merged

Bytecode Interpreter (new branch) #860

merged 9 commits into from
Jan 2, 2021

Conversation

jasonwilliams
Copy link
Member

This does run!

Nodes implement CodeGen which generates instructions onto a stack held in Context.
The VM will interpret the instructions from Context.

There are some issues:

  • only basic instructions are added, but im working off https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/Bytecode for now it should be easy to add more in.
  • The Stack is a Vec, this isn't ideal (we may be able to live with it for now) but the stack should really be a fixed sized array. This isn't possible because Value can't be copied in there as it holds Rc and Gc values. Can we have fixed-sized Values that hold a pointer?
  • I needed to copy the Instruction vec, i couldn't find a way to pass in both ctx and ctx.instructions together without it moaning about "mutable borrowing" twice.
  • I need to change boa_cli back to the normal run.

As most of this is behind a feature flag it would be good to merge parts of it so we can work on as the main interpreter is active. Then one day we can switch over.

for

2 + 2

The instructions generated are

[boa/src/context.rs:689] &self.instruction_stack = [
    Int32       2,
    Int32       2,
    Add,
]
4

We can optimize even further here and just do the addition at CodeGen level and throw 4 onto the stack

Fixes #167
@Razican @HalidOdat

@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #860 (f5c4f85) into master (90a8587) will decrease coverage by 1.54%.
The diff coverage is 0.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #860      +/-   ##
==========================================
- Coverage   60.27%   58.72%   -1.55%     
==========================================
  Files         169      172       +3     
  Lines       11415    11728     +313     
==========================================
+ Hits         6880     6887       +7     
- Misses       4535     4841     +306     
Impacted Files Coverage Δ
boa/src/context.rs 61.56% <0.00%> (-4.13%) ⬇️
boa/src/lib.rs 88.46% <ø> (ø)
boa/src/profiler.rs 0.00% <ø> (ø)
boa/src/syntax/ast/node/operator/bin_op/mod.rs 52.32% <0.00%> (-14.35%) ⬇️
boa/src/syntax/ast/node/statement_list/mod.rs 44.18% <0.00%> (-4.54%) ⬇️
boa/src/vm/compilation.rs 0.00% <0.00%> (ø)
boa/src/vm/instructions.rs 0.00% <0.00%> (ø)
boa/src/vm/mod.rs 0.00% <0.00%> (ø)
boa/src/syntax/ast/node/operator/unary_op/mod.rs 56.41% <6.25%> (-11.93%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90a8587...f5c4f85. Read the comment docs.

@github-actions
Copy link

Benchmark for e97c522

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 359.2±4.97ns 356.6±7.07ns +0.73%
Arithmetic operations (Full) 233.0±3.06µs 230.2±4.38µs +1.22%
Array access (Execution) 7.6±0.11µs 7.7±0.12µs -1.30%
Array access (Full) 250.1±5.40µs 252.3±3.27µs -0.87%
Array creation (Execution) 2.8±0.03ms 2.9±0.03ms -3.45%
Array creation (Full) 2.9±0.06ms 3.0±0.03ms -3.33%
Array pop (Execution) 1047.2±7.48µs 1069.2±11.02µs -2.06%
Array pop (Full) 1472.4±10.63µs 1427.1±50.37µs +3.17%
Boolean Object Access (Execution) 4.5±0.06µs 4.6±0.04µs -2.17%
Boolean Object Access (Full) 244.8±3.30µs 246.4±2.22µs -0.65%
Clean js (Execution) 690.7±6.05µs 693.1±8.66µs -0.35%
Clean js (Full) 994.6±10.49µs 959.5±21.74µs +3.66%
Clean js (Parser) 35.3±0.74µs 35.6±0.99µs -0.84%
Create Realm 472.9±5.85ns 461.8±4.30ns +2.40%
Dynamic Object Property Access (Execution) 5.4±0.08µs 5.5±0.04µs -1.82%
Dynamic Object Property Access (Full) 243.8±6.04µs 249.1±5.19µs -2.13%
Expression (Parser) 6.8±0.08µs 6.6±0.13µs +3.03%
Fibonacci (Execution) 804.5±11.92µs 800.1±16.04µs +0.55%
Fibonacci (Full) 1061.4±16.46µs 1074.5±11.32µs -1.22%
For loop (Execution) 22.2±0.31µs 21.8±0.45µs +1.83%
For loop (Full) 271.0±7.43µs 271.2±5.08µs -0.07%
For loop (Parser) 18.2±0.19µs 18.1±0.19µs +0.55%
Goal Symbols (Parser) 12.0±0.25µs 12.3±0.13µs -2.44%
Hello World (Parser) 3.3±0.03µs 3.2±0.06µs +3.12%
Long file (Parser) 757.4±11.92ns 762.6±6.35ns -0.68%
Mini js (Execution) 612.7±12.82µs 615.3±14.41µs -0.42%
Mini js (Full) 886.8±9.14µs 870.1±16.68µs +1.92%
Mini js (Parser) 31.8±0.27µs 31.6±0.65µs +0.63%
Number Object Access (Execution) 3.7±0.02µs 3.6±0.03µs +2.78%
Number Object Access (Full) 243.8±7.57µs 241.6±4.20µs +0.91%
Object Creation (Execution) 4.6±0.08µs 4.6±0.10µs 0.00%
Object Creation (Full) 249.3±2.49µs 249.4±1.41µs -0.04%
RegExp (Execution) 9.3±0.15µs 9.0±0.26µs +3.33%
RegExp (Full) 252.2±4.85µs 252.3±4.30µs -0.04%
RegExp Literal (Execution) 10.3±0.14µs 10.1±0.22µs +1.98%
RegExp Literal (Full) 256.1±3.30µs 250.2±5.72µs +2.36%
RegExp Literal Creation (Execution) 9.4±0.10µs 9.0±0.23µs +4.44%
RegExp Literal Creation (Full) 249.4±4.50µs 252.2±2.17µs -1.11%
Static Object Property Access (Execution) 4.9±0.06µs 4.9±0.11µs 0.00%
Static Object Property Access (Full) 245.4±2.92µs 247.7±2.94µs -0.93%
String Object Access (Execution) 6.8±0.12µs 6.9±0.04µs -1.45%
String Object Access (Full) 252.4±3.39µs 250.1±5.44µs +0.92%
String comparison (Execution) 6.4±0.10µs 6.1±0.13µs +4.92%
String comparison (Full) 248.6±4.69µs 243.4±5.34µs +2.14%
String concatenation (Execution) 5.2±0.12µs 5.0±0.08µs +4.00%
String concatenation (Full) 245.1±4.45µs 245.1±4.02µs 0.00%
String copy (Execution) 3.9±0.08µs 3.8±0.11µs +2.63%
String copy (Full) 236.3±2.90µs 237.7±5.89µs -0.59%
Symbols (Execution) 3.3±0.04µs 3.3±0.04µs 0.00%
Symbols (Full) 227.7±7.30µs 233.2±4.31µs -2.36%

@github-actions
Copy link

Benchmark for f150203

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 347.5±24.21ns 349.1±40.86ns -0.46%
Arithmetic operations (Full) 245.7±13.38µs 249.3±16.89µs -1.44%
Array access (Execution) 8.1±0.50µs 8.3±0.70µs -2.41%
Array access (Full) 268.9±17.45µs 274.5±14.19µs -2.04%
Array creation (Execution) 2.6±0.14ms 2.6±0.14ms 0.00%
Array creation (Full) 2.9±0.15ms 3.0±0.15ms -3.33%
Array pop (Execution) 942.4±51.23µs 927.0±56.78µs +1.66%
Array pop (Full) 1411.0±68.73µs 1448.2±75.41µs -2.57%
Boolean Object Access (Execution) 4.5±0.24µs 4.6±0.30µs -2.17%
Boolean Object Access (Full) 263.5±16.43µs 270.2±14.10µs -2.48%
Clean js (Execution) 683.0±33.94µs 678.7±35.56µs +0.63%
Clean js (Full) 982.0±46.63µs 1005.0±59.36µs -2.29%
Clean js (Parser) 37.2±1.98µs 35.4±1.95µs +5.08%
Create Realm 447.9±25.76ns 442.8±25.55ns +1.15%
Dynamic Object Property Access (Execution) 5.9±0.37µs 5.7±0.24µs +3.51%
Dynamic Object Property Access (Full) 269.4±20.57µs 270.5±15.20µs -0.41%
Expression (Parser) 6.8±0.47µs 6.7±0.51µs +1.49%
Fibonacci (Execution) 890.2±48.29µs 960.4±39.07µs -7.31%
Fibonacci (Full) 1172.0±54.81µs 1176.2±57.23µs -0.36%
For loop (Execution) 23.5±1.41µs 24.9±1.60µs -5.62%
For loop (Full) 288.8±14.89µs 291.2±19.19µs -0.82%
For loop (Parser) 18.3±1.11µs 18.5±0.91µs -1.08%
Goal Symbols (Parser) 12.1±0.70µs 11.7±0.67µs +3.42%
Hello World (Parser) 3.4±0.27µs 3.2±0.22µs +6.25%
Long file (Parser) 756.5±37.73ns 752.5±43.22ns +0.53%
Mini js (Execution) 601.3±32.63µs 622.3±35.90µs -3.37%
Mini js (Full) 897.9±50.67µs 895.6±51.70µs +0.26%
Mini js (Parser) 32.9±3.18µs 31.9±1.89µs +3.13%
Number Object Access (Execution) 3.7±0.23µs 3.7±0.17µs 0.00%
Number Object Access (Full) 260.5±14.59µs 258.9±14.40µs +0.62%
Object Creation (Execution) 5.1±0.36µs 5.0±0.28µs +2.00%
Object Creation (Full) 265.4±15.34µs 271.9±18.10µs -2.39%
RegExp (Execution) 9.4±0.53µs 9.4±0.63µs 0.00%
RegExp (Full) 263.2±14.95µs 264.4±15.46µs -0.45%
RegExp Literal (Execution) 10.3±0.70µs 10.4±0.59µs -0.96%
RegExp Literal (Full) 273.9±17.76µs 274.3±18.75µs -0.15%
RegExp Literal Creation (Execution) 9.1±0.63µs 9.3±0.60µs -2.15%
RegExp Literal Creation (Full) 263.7±16.19µs 276.4±18.34µs -4.59%
Static Object Property Access (Execution) 5.4±0.38µs 5.3±0.28µs +1.89%
Static Object Property Access (Full) 266.6±23.58µs 270.2±19.61µs -1.33%
String Object Access (Execution) 7.0±0.41µs 7.3±0.64µs -4.11%
String Object Access (Full) 265.7±17.83µs 268.7±14.66µs -1.12%
String comparison (Execution) 6.4±0.43µs 6.6±0.48µs -3.03%
String comparison (Full) 268.5±18.20µs 267.0±20.03µs +0.56%
String concatenation (Execution) 5.4±0.36µs 5.4±0.38µs 0.00%
String concatenation (Full) 261.9±16.85µs 262.5±30.68µs -0.23%
String copy (Execution) 4.2±0.25µs 4.3±0.24µs -2.33%
String copy (Full) 255.2±13.41µs 257.2±15.51µs -0.78%
Symbols (Execution) 3.7±0.22µs 3.7±0.17µs 0.00%
Symbols (Full) 247.5±18.09µs 255.5±14.15µs -3.13%

@jasonwilliams
Copy link
Member Author

@HalidOdat i was hoping to get some sort of trace output, like this

$ cargo run -- --trace
> function fibo(x) { if (x<2) return 1; return fibo(x-1)+fibo(x-2)}
00020m 00000 Return                    <empty>
undefined
> fibo(3)
00009m 00000 PushInt8 3                <empty>
00015m 00002 GetValue 'fibo'           3.0
00066m 00007 Call 1                    Function
--> call function
  module_id:0 func_id:0
00007m 00000 GetValue 'x'              <empty>
00001m 00005 PushInt8 2                3.0
00013m 00007 Lt                        2.0

...

00001m 00007 Lt                        2.0
00000m 00008 JmpIfFalse 00016          true
00000m 00013 PushInt8 1                <empty>
00167m 00015 Return                    1.0
<-- return value(1.0)
  module_id:0 func_id:2
00001m 00052 Add                       1.0
00044m 00053 Return                    3.0
<-- return value(3.0)
  module_id:0 func_id:0
00000m 00012 Return                    3.0
3
> 
   |     |     |                        | 
   |     |     |                        \- value at the top of exec stack
   |     |     \-------------------------- instruction
   |     \-------------------------------- program counter
   \-------------------------------------- execution time per inst. (in microsecs)

So i've added Display for Instruction

@github-actions
Copy link

github-actions bot commented Oct 19, 2020

Test262 conformance changes:

Test result master count PR count difference
Total 78,493 78,493 0
Passed 23,805 23,805 0
Ignored 15,585 15,585 0
Failed 39,103 39,103 0
Panics 362 362 0
Conformance 30.33 30.33 0.00%

@github-actions
Copy link

Benchmark for d5cbe3e

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 363.3±1.43ns 360.8±0.90ns +0.69%
Arithmetic operations (Full) 240.0±0.69µs 242.6±0.45µs -1.07%
Array access (Execution) 8.1±0.05µs 8.1±0.05µs 0.00%
Array access (Full) 263.9±1.15µs 259.6±1.86µs +1.66%
Array creation (Execution) 2.8±0.01ms 2.8±0.01ms 0.00%
Array creation (Full) 3.1±0.01ms 3.1±0.01ms 0.00%
Array pop (Execution) 1040.0±14.38µs 1035.1±10.09µs +0.47%
Array pop (Full) 1513.7±3.96µs 1503.0±13.11µs +0.71%
Boolean Object Access (Execution) 4.6±0.04µs 4.7±0.01µs -2.13%
Boolean Object Access (Full) 256.1±0.85µs 255.0±0.45µs +0.43%
Clean js (Execution) 718.3±3.95µs 713.6±4.03µs +0.66%
Clean js (Full) 1017.2±9.22µs 1011.9±7.01µs +0.52%
Clean js (Parser) 36.8±0.21µs 36.8±0.13µs 0.00%
Create Realm 458.5±1.35ns 465.9±3.24ns -1.59%
Dynamic Object Property Access (Execution) 5.6±0.03µs 5.7±0.01µs -1.75%
Dynamic Object Property Access (Full) 257.8±1.34µs 252.7±1.91µs +2.02%
Expression (Parser) 6.9±0.02µs 6.9±0.01µs 0.00%
Fibonacci (Execution) 843.7±3.13µs 835.1±3.58µs +1.03%
Fibonacci (Full) 1111.8±3.07µs 1117.9±4.89µs -0.55%
For loop (Execution) 22.2±0.20µs 22.4±0.24µs -0.89%
For loop (Full) 282.0±0.92µs 280.7±0.68µs +0.46%
For loop (Parser) 18.1±0.07µs 18.2±0.04µs -0.55%
Goal Symbols (Parser) 12.5±0.04µs 12.5±0.03µs 0.00%
Hello World (Parser) 3.3±0.01µs 3.4±0.00µs -2.94%
Long file (Parser) 766.0±1.95ns 765.7±1.34ns +0.04%
Mini js (Execution) 645.2±4.37µs 640.9±4.31µs +0.67%
Mini js (Full) 914.8±6.09µs 914.7±5.96µs +0.01%
Mini js (Parser) 32.3±0.26µs 32.2±0.13µs +0.31%
Number Object Access (Execution) 3.7±0.01µs 3.7±0.10µs 0.00%
Number Object Access (Full) 252.4±0.67µs 252.0±0.37µs +0.16%
Object Creation (Execution) 4.8±0.02µs 4.8±0.02µs 0.00%
Object Creation (Full) 254.0±0.57µs 252.9±3.64µs +0.43%
RegExp (Execution) 9.6±0.11µs 9.7±0.06µs -1.03%
RegExp (Full) 261.0±0.82µs 256.3±0.92µs +1.83%
RegExp Literal (Execution) 10.8±0.07µs 10.9±0.18µs -0.92%
RegExp Literal (Full) 264.4±0.82µs 262.2±0.52µs +0.84%
RegExp Literal Creation (Execution) 9.6±0.05µs 9.7±0.03µs -1.03%
RegExp Literal Creation (Full) 257.6±1.84µs 256.2±1.61µs +0.55%
Static Object Property Access (Execution) 5.1±0.01µs 5.1±0.01µs 0.00%
Static Object Property Access (Full) 255.1±1.05µs 254.8±0.66µs +0.12%
String Object Access (Execution) 7.0±0.03µs 7.1±0.03µs -1.41%
String Object Access (Full) 258.3±0.93µs 258.9±0.60µs -0.23%
String comparison (Execution) 6.6±0.24µs 6.6±0.03µs 0.00%
String comparison (Full) 258.6±1.16µs 258.8±0.43µs -0.08%
String concatenation (Execution) 5.3±0.02µs 5.3±0.03µs 0.00%
String concatenation (Full) 252.7±0.65µs 252.7±0.69µs 0.00%
String copy (Execution) 4.1±0.01µs 4.1±0.02µs 0.00%
String copy (Full) 248.4±0.65µs 246.9±0.76µs +0.61%
Symbols (Execution) 3.4±0.01µs 3.5±0.01µs -2.86%
Symbols (Full) 242.7±1.01µs 241.3±0.61µs +0.58%

@github-actions
Copy link

Benchmark for d38e554

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 376.1±4.44ns 349.7±16.80ns +7.55%
Arithmetic operations (Full) 266.7±4.64µs 254.7±14.58µs +4.71%
Array access (Execution) 8.7±0.18µs 8.1±0.40µs +7.41%
Array access (Full) 293.1±9.86µs 276.9±11.31µs +5.85%
Array creation (Execution) 2.9±0.17ms 2.3±0.11ms +26.09%
Array creation (Full) 3.1±0.05ms 2.9±0.11ms +6.90%
Array pop (Execution) 1019.8±14.85µs 871.4±64.28µs +17.03%
Array pop (Full) 1535.1±27.16µs 1510.5±28.28µs +1.63%
Boolean Object Access (Execution) 5.1±0.24µs 4.8±0.17µs +6.25%
Boolean Object Access (Full) 275.5±6.29µs 270.5±11.81µs +1.85%
Clean js (Execution) 741.8±10.24µs 654.6±31.53µs +13.32%
Clean js (Full) 1038.0±48.01µs 1025.0±45.63µs +1.27%
Clean js (Parser) 39.8±1.44µs 40.2±1.10µs -1.00%
Create Realm 490.8±26.02ns 445.9±51.89ns +10.07%
Dynamic Object Property Access (Execution) 6.4±0.18µs 5.2±0.28µs +23.08%
Dynamic Object Property Access (Full) 288.2±18.21µs 284.4±10.17µs +1.34%
Expression (Parser) 7.0±0.26µs 6.4±0.36µs +9.37%
Fibonacci (Execution) 970.2±29.92µs 912.9±39.46µs +6.28%
Fibonacci (Full) 1285.1±33.71µs 1175.9±40.95µs +9.29%
For loop (Execution) 24.6±0.56µs 22.0±1.40µs +11.82%
For loop (Full) 307.6±3.85µs 286.6±10.80µs +7.33%
For loop (Parser) 18.4±0.78µs 17.1±0.83µs +7.60%
Goal Symbols (Parser) 12.6±0.65µs 12.6±0.34µs 0.00%
Hello World (Parser) 3.4±0.15µs 3.2±0.17µs +6.25%
Long file (Parser) 768.9±38.76ns 778.5±42.73ns -1.23%
Mini js (Execution) 665.3±15.42µs 642.7±29.77µs +3.52%
Mini js (Full) 930.0±35.72µs 886.9±36.76µs +4.86%
Mini js (Parser) 34.9±0.54µs 35.1±0.43µs -0.57%
Number Object Access (Execution) 3.9±0.07µs 3.6±0.15µs +8.33%
Number Object Access (Full) 274.6±9.57µs 265.1±13.40µs +3.58%
Object Creation (Execution) 5.4±0.17µs 4.5±0.29µs +20.00%
Object Creation (Full) 286.4±22.91µs 282.3±6.74µs +1.45%
RegExp (Execution) 9.9±0.21µs 9.6±0.40µs +3.13%
RegExp (Full) 285.8±6.31µs 275.5±13.89µs +3.74%
RegExp Literal (Execution) 11.1±0.42µs 10.1±0.58µs +9.90%
RegExp Literal (Full) 291.9±6.87µs 277.9±11.94µs +5.04%
RegExp Literal Creation (Execution) 9.9±0.17µs 9.0±0.53µs +10.00%
RegExp Literal Creation (Full) 286.2±11.53µs 274.1±12.92µs +4.41%
Static Object Property Access (Execution) 6.1±0.17µs 4.7±0.26µs +29.79%
Static Object Property Access (Full) 289.8±5.79µs 277.2±10.15µs +4.55%
String Object Access (Execution) 7.7±0.20µs 7.3±0.35µs +5.48%
String Object Access (Full) 289.6±8.37µs 271.0±10.81µs +6.86%
String comparison (Execution) 7.0±0.24µs 6.4±0.36µs +9.37%
String comparison (Full) 275.6±12.37µs 261.0±12.80µs +5.59%
String concatenation (Execution) 5.7±0.08µs 5.3±0.35µs +7.55%
String concatenation (Full) 269.7±8.38µs 257.9±10.13µs +4.58%
String copy (Execution) 4.4±0.13µs 4.0±0.21µs +10.00%
String copy (Full) 259.4±9.48µs 253.1±11.41µs +2.49%
Symbols (Execution) 4.0±0.08µs 3.4±0.15µs +17.65%
Symbols (Full) 266.5±3.69µs 246.8±12.25µs +7.98%

Jason Williams and others added 9 commits January 2, 2021 16:58
* Bytecode interpreter

* Added push and pop to Vm

* Add undefined, null, bool bytecodes

* Add string literals

* Add BigInt literal bytecode

* Split Bool to True and False

* Add Zero and One bytecodes

* Add Rational bytecode

* Added some unary operators

Co-authored-by: Jason Williams <jwilliams720@bloomberg.net>
* Instructions will need to implement Display so we can output them in a trace
- profiler only needed in vm mode
@jasonwilliams jasonwilliams merged commit 1052ccd into master Jan 2, 2021
@github-actions
Copy link

github-actions bot commented Jan 2, 2021

Benchmark for 1be6aab

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 357.5±36.59ns 326.4±28.35ns +9.53%
Arithmetic operations (Full) 250.8±22.48µs 230.8±17.21µs +8.67%
Array access (Execution) 7.4±0.36µs 7.4±0.26µs 0.00%
Array access (Full) 258.3±18.52µs 277.3±15.36µs -6.85%
Array creation (Execution) 2.7±0.25ms 2.6±0.22ms +3.85%
Array creation (Full) 2.7±0.12ms 2.8±0.14ms -3.57%
Array pop (Execution) 998.6±62.21µs 949.7±67.60µs +5.15%
Array pop (Full) 1359.1±100.29µs 1361.8±55.49µs -0.20%
Boolean Object Access (Execution) 4.4±0.19µs 4.6±0.39µs -4.35%
Boolean Object Access (Full) 244.0±13.31µs 261.0±20.08µs -6.51%
Clean js (Execution) 672.5±36.11µs 721.2±65.33µs -6.75%
Clean js (Full) 978.6±100.13µs 996.5±78.79µs -1.80%
Clean js (Parser) 37.2±1.75µs 35.2±3.31µs +5.68%
Create Realm 440.8±28.33ns 453.1±16.86ns -2.71%
Dynamic Object Property Access (Execution) 5.2±0.41µs 5.0±0.34µs +4.00%
Dynamic Object Property Access (Full) 268.5±22.63µs 276.5±15.62µs -2.89%
Expression (Parser) 6.5±0.52µs 6.6±0.57µs -1.52%
Fibonacci (Execution) 856.4±37.68µs 879.3±58.33µs -2.60%
Fibonacci (Full) 1140.3±46.61µs 1222.6±98.56µs -6.73%
For loop (Execution) 22.1±1.87µs 21.5±1.14µs +2.79%
For loop (Full) 278.7±18.35µs 270.1±18.68µs +3.18%
For loop (Parser) 18.0±1.63µs 16.5±1.17µs +9.09%
Goal Symbols (Parser) 12.2±0.83µs 10.7±0.90µs +14.02%
Hello World (Parser) 3.2±0.19µs 2.8±0.19µs +14.29%
Long file (Parser) 752.2±57.75ns 713.5±40.11ns +5.42%
Mini js (Execution) 616.2±47.38µs 621.1±55.17µs -0.79%
Mini js (Full) 873.7±51.35µs 891.1±66.49µs -1.95%
Mini js (Parser) 31.6±2.11µs 28.4±1.40µs +11.27%
Number Object Access (Execution) 3.6±0.28µs 3.5±0.19µs +2.86%
Number Object Access (Full) 254.5±19.37µs 240.0±23.66µs +6.04%
Object Creation (Execution) 4.7±0.14µs 4.3±0.41µs +9.30%
Object Creation (Full) 250.3±13.07µs 260.6±12.70µs -3.95%
RegExp (Execution) 8.9±0.73µs 8.6±0.33µs +3.49%
RegExp (Full) 261.9±14.65µs 264.7±16.26µs -1.06%
RegExp Literal (Execution) 9.7±0.55µs 10.0±1.07µs -3.00%
RegExp Literal (Full) 270.5±23.12µs 262.1±17.50µs +3.20%
RegExp Literal Creation (Execution) 8.8±0.63µs 9.5±0.74µs -7.37%
RegExp Literal Creation (Full) 263.9±17.10µs 246.3±16.46µs +7.15%
Static Object Property Access (Execution) 4.7±0.23µs 4.8±0.42µs -2.08%
Static Object Property Access (Full) 244.1±15.56µs 268.0±14.54µs -8.92%
String Object Access (Execution) 6.6±0.35µs 6.6±0.47µs 0.00%
String Object Access (Full) 249.1±19.61µs 241.3±11.46µs +3.23%
String comparison (Execution) 6.1±0.33µs 6.3±0.54µs -3.17%
String comparison (Full) 262.4±19.03µs 257.0±20.93µs +2.10%
String concatenation (Execution) 5.2±0.30µs 4.7±0.20µs +10.64%
String concatenation (Full) 256.1±21.88µs 247.1±31.16µs +3.64%
String copy (Execution) 3.5±0.29µs 3.7±0.45µs -5.41%
String copy (Full) 250.2±12.63µs 249.5±18.53µs +0.28%
Symbols (Execution) 3.3±0.29µs 3.3±0.26µs 0.00%
Symbols (Full) 234.2±12.41µs 232.4±16.19µs +0.77%

@Razican Razican added this to the v0.11.0 milestone Jan 2, 2021
@Razican Razican added enhancement New feature or request execution Issues or PRs related to code execution labels Jan 2, 2021
@RageKnify RageKnify deleted the vm2 branch January 2, 2021 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate Bytecode
4 participants