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

Object specialization #419

Merged
merged 9 commits into from
Jun 15, 2020
Merged

Object specialization #419

merged 9 commits into from
Jun 15, 2020

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented May 25, 2020

It changes the following:

  • Specializes objects
  • Implements Hash trait for Value
  • Implements PartialEq trait based on the SameValueZero algorithm for Value (required by Hash trait)
  • Implements Eq trait for Value (required by Hash trait)
  • Fixed a bug when comparing object pointers in same_value_non_number
  • Deprecated ObjectInternalMethods
  • Fixed Symbol primitive
  • Added construct_type_error and construct_range_error
  • Made Number objects constructor and methods more specification compliant.
  • Abstracted Object name and function object length.
  • Changed init functions to return (&str, Value)

The problem with the current implementation is that we store the data in an internal slot. The internal slots are stored as a HashMap, which means slow reads and writes. Additionally they are stored as a Value which means we need additional checks to unwrap the Value into a primitive (example f64, String) to access the data. Furthermore we are restricted as to what type of data we can hold, for example if we wanted to implement Set object with native type HashSet, we can not do so in the internal slots as they are specified in the standard (it's only an implementation detail).
This PR aims to allow use of non-Value types in objects as well as removing the need for internals slots for data storage (NumberData, StringData, etc), removing redundant checks for data access. It should increase performance greatly for object access and a bit for object creation. (I'm not sure the benchmarks will show it though, since we do not have benchmarks for objects).

Specialized objects:

  • Number
  • String
  • Function
  • Array
  • Symbol
  • Boolean
  • BigInt
  • RegExp

@HalidOdat HalidOdat added enhancement New feature or request performance Performance related changes and issues technical debt builtins PRs and Issues related to builtins/intrinsics labels May 25, 2020
@HalidOdat HalidOdat changed the title Initial object specialization of Number Object specialization May 25, 2020
@HalidOdat HalidOdat force-pushed the feature/specialized-objects branch from 928ee40 to 62bdd68 Compare May 26, 2020 11:37
@github-actions
Copy link

Benchmark for 3d93be3

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 428.5±21.73µs 423.8±18.64µs 101%
Expression (Lexer) 2.0±0.10µs 2.1±0.11µs 96%
Expression (Parser) 4.8±0.25µs 4.7±0.24µs 103%
Fibonacci (Execution) 2.8±0.12ms 2.7±0.12ms 106%
For loop (Execution) 450.7±22.68µs 435.2±21.77µs 104%
For loop (Lexer) 5.2±0.25µs 5.3±0.25µs 98%
For loop (Parser) 13.5±0.75µs 13.3±0.74µs 101%
Hello World (Lexer) 970.7±45.03ns 1001.7±47.19ns 97%
Hello World (Parser) 2.2±0.14µs 2.2±0.13µs 103%
Symbols (Execution) 466.5±20.48µs 438.8±19.30µs 106%
undefined undefined 100%

@HalidOdat HalidOdat force-pushed the feature/specialized-objects branch from 62bdd68 to 5c4dc6f Compare May 26, 2020 17:04
@github-actions
Copy link

Benchmark for 36cc48e

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 446.9±14.88µs 449.5±19.05µs 99%
Expression (Lexer) 2.2±0.09µs 2.1±0.13µs 101%
Expression (Parser) 5.1±0.15µs 5.2±0.28µs 97%
Fibonacci (Execution) 2.7±0.13ms 2.7±0.14ms 99%
For loop (Execution) 462.9±15.70µs 466.7±26.44µs 99%
For loop (Lexer) 5.6±0.20µs 5.6±0.24µs 100%
For loop (Parser) 14.0±0.67µs 14.2±0.66µs 99%
Hello World (Lexer) 1013.2±39.76ns 1008.5±33.04ns 100%
Hello World (Parser) 2.3±0.12µs 2.4±0.10µs 99%
Symbols (Execution) 483.6±23.77µs 467.9±16.13µs 103%
undefined undefined 100%

@HalidOdat
Copy link
Member Author

HalidOdat commented May 26, 2020

@Razican and @jasonwilliams I'm having a bit of trouble with the garbage collector.
I'm getting this error when construction/calling Array:

thread 'main' panicked at 'GcCell<T> already borrowed', <::std::macros::panic macros>:5:6

Any help would be useful

@github-actions
Copy link

Benchmark for b52be12

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 418.2±25.13µs 428.6±25.85µs 98%
Expression (Lexer) 2.1±0.13µs 2.1±0.10µs 100%
Expression (Parser) 5.3±0.17µs 5.1±0.95µs 103%
Fibonacci (Execution) 2.8±0.12ms 2.7±0.14ms 101%
For loop (Execution) 454.0±27.35µs 447.2±31.50µs 102%
For loop (Lexer) 5.8±0.22µs 5.5±0.29µs 106%
For loop (Parser) 15.3±0.45µs 14.7±0.90µs 105%
Hello World (Lexer) 995.4±58.92ns 1030.7±68.24ns 96%
Hello World (Parser) 2.4±0.11µs 2.3±0.17µs 108%
Symbols (Execution) 457.7±33.26µs 454.7±31.08µs 101%
undefined undefined 100%

@Razican
Copy link
Member

Razican commented May 26, 2020

@Razican and @jasonwilliams I'm having a bit of trouble with the garbage collector.
I'm getting this error when construction/calling Array:

thread 'main' panicked at 'GcCell<T> already borrowed', <::std::macros::panic macros>:5:6

Any help would be useful

I'm not very used to deal with the Gc, but this seems to be that two calls to borrow() were made one after the other without a clone() or a scope ending in the middle.

@github-actions
Copy link

Benchmark for b1ff14c

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 430.4±10.16µs 439.4±10.91µs 98%
Expression (Lexer) 1904.4±109.31ns 2.1±0.08µs 90.99999999999999%
Expression (Parser) 5.0±0.16µs 4.9±0.31µs 102%
Fibonacci (Execution) 2.6±0.08ms 2.6±0.09ms 98%
For loop (Execution) 448.2±18.54µs 407.6±19.47µs 110.00000000000001%
For loop (Lexer) 5.4±0.17µs 5.1±0.24µs 106%
For loop (Parser) 13.5±0.30µs 13.1±0.64µs 103%
Hello World (Lexer) 991.5±12.53ns 963.3±44.15ns 103%
Hello World (Parser) 2.3±0.09µs 2.2±0.09µs 102%
Symbols (Execution) 457.3±12.72µs 458.6±10.63µs 100%
undefined undefined 100%

@HalidOdat
Copy link
Member Author

HalidOdat commented May 27, 2020

I did some benchmarks on Object creation and access

I think the other execution benchmarks are wrong, we use exec function to benchmark execution, but exec does not just execute the string, it lexes, parsers, creates the interpreter and initializes/creates the realm and then it executes the code, aren't we polluting the result of the benchmark? Shouldn't we isolate what were executing as much as possible, right?
With exec function, I saw a ~4%, when I isolated the execution I saw a ~20% increase for object creation/access.

You can check the benchmark here

What do you think @Razican and @jasonwilliams ?

@Razican
Copy link
Member

Razican commented May 27, 2020

I did some benchmarks on Object creation and access

I think the other execution benchmarks are wrong, we use exec function to benchmark execution, but exec does not just execute the string, it lexes, parsers, creates the interpreter and initializes/creates the realm and then it executes the code, aren't we polluting the result of the benchmark? Shouldn't we isolate what were executing as much as possible, right?
With exec function, I saw a ~4%, when I isolated the execution I saw a ~20% increase for object creation/access.

You can check the benchmark here

What do you think @Razican and @jasonwilliams ?

@jasonwilliams noticed that most of the execution time is spent on Realm creation, so I think we should isolate the actual execution, yes, in order to see if we improve or worsen there.

@hello2dj hello2dj mentioned this pull request May 28, 2020
@brian-gavin brian-gavin mentioned this pull request May 28, 2020
@jasonwilliams
Copy link
Member

I think we need to make some benchmark issues and get them in before this so we can have some before/after

@github-actions
Copy link

Benchmark for d0b4745

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 455.5±16.60µs 531.8±70.41µs 83%
Expression (Lexer) 2.2±0.09µs 2.3±0.12µs 97%
Expression (Parser) 5.6±0.45µs 5.3±0.17µs 106%
Fibonacci (Execution) 3.0±0.10ms 3.1±0.12ms 97%
For loop (Execution) 500.8±29.44µs 472.2±26.69µs 106%
For loop (Lexer) 6.0±0.25µs 5.6±0.18µs 109.00000000000001%
For loop (Parser) 14.3±0.40µs 14.5±0.69µs 99%
Hello World (Lexer) 1036.1±33.18ns 1036.1±32.72ns 100%
Hello World (Parser) 2.3±0.11µs 2.5±0.19µs 94%
Symbols (Execution) 480.1±12.42µs 483.5±19.79µs 99%
undefined undefined 100%

@HalidOdat HalidOdat added this to the v0.9.0 milestone May 28, 2020
@github-actions
Copy link

Benchmark for 345bcc1

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 437.7±12.43µs 443.0±20.56µs 99%
Expression (Lexer) 2.1±0.10µs 2.2±0.09µs 99%
Expression (Parser) 5.0±0.21µs 5.0±0.18µs 99%
Fibonacci (Execution) 2.8±0.11ms 2.8±0.11ms 100%
For loop (Execution) 454.5±15.66µs 464.9±16.46µs 98%
For loop (Lexer) 5.5±0.17µs 5.6±0.29µs 98%
For loop (Parser) 13.9±0.81µs 14.3±0.70µs 97%
Hello World (Lexer) 1020.2±45.76ns 1029.9±63.53ns 99%
Hello World (Parser) 2.3±0.09µs 2.4±0.10µs 95%
Symbols (Execution) 473.8±21.90µs 486.5±25.47µs 97%
undefined undefined 100%

@github-actions
Copy link

Benchmark for 38d0eb1

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 427.6±8.26µs 440.7±9.92µs 97%
Expression (Lexer) 2.1±0.03µs 2.1±0.05µs 98%
Expression (Parser) 5.1±0.11µs 5.1±0.07µs 100%
Fibonacci (Execution) 2.6±0.06ms 2.7±0.05ms 100%
For loop (Execution) 445.0±7.99µs 450.1±8.19µs 99%
For loop (Lexer) 5.5±0.12µs 5.5±0.09µs 100%
For loop (Parser) 13.7±0.47µs 14.0±0.69µs 98%
Hello World (Lexer) 996.4±29.51ns 993.8±11.09ns 100%
Hello World (Parser) 2.3±0.04µs 2.3±0.04µs 100%
Symbols (Execution) 453.7±8.68µs 463.8±14.34µs 98%
undefined undefined 100%

@HalidOdat HalidOdat force-pushed the feature/specialized-objects branch from 896ba46 to d3d7fb8 Compare May 30, 2020 12:52
@github-actions
Copy link

Benchmark for 494d109

Click to view benchmark
Test PR Benchmark Master Benchmark %
Create Realm 431.3±12.20µs 431.1±9.46µs 100%
Expression (Lexer) 2.1±0.06µs 2.1±0.04µs 102%
Expression (Parser) 5.0±0.17µs 5.1±0.13µs 99%
Fibonacci (Execution) 2.6±0.06ms 2.6±0.06ms 100%
For loop (Execution) 449.3±13.71µs 458.7±11.23µs 98%
For loop (Lexer) 5.6±0.12µs 5.4±0.21µs 104%
For loop (Parser) 13.6±0.41µs 13.6±0.34µs 100%
Hello World (Lexer) 1018.5±31.89ns 973.5±31.76ns 105%
Hello World (Parser) 2.2±0.05µs 2.2±0.07µs 100%
Symbols (Execution) 462.0±10.12µs 457.6±14.79µs 101%
undefined undefined 100%

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.

OK, an extra bunch of comments. I think one of the best things we could do is using an Object directly instead of a Value as the global object when initializing the Realm.

boa/src/builtins/array/mod.rs Show resolved Hide resolved
boa/src/builtins/boolean/mod.rs Show resolved Hide resolved
boa/src/builtins/error/type.rs Show resolved Hide resolved

prototype
.as_object_mut()
.unwrap()
Copy link
Member

Choose a reason for hiding this comment

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

This has not been changed, right?

parent.set_field(Value::from(name_copy), new_func_obj);
parent
.as_object_mut()
.unwrap()
Copy link
Member

Choose a reason for hiding this comment

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

This was not changed, right?

boa/src/exec/mod.rs Show resolved Hide resolved
boa/src/exec/mod.rs Show resolved Hide resolved
boa/src/exec/mod.rs Show resolved Hide resolved
Comment on lines 546 to 579
self.throw_type_error("cannot convert null or undefined to Object")?;
unreachable!();
Copy link
Member

Choose a reason for hiding this comment

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

Should we do this in this PR or in a different one?

boa/src/exec/mod.rs Show resolved Hide resolved
@HalidOdat HalidOdat force-pushed the feature/specialized-objects branch from d19ed61 to 598adfe Compare June 14, 2020 16:17
@github-actions
Copy link

Benchmark for 31c4c6c

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 23.7±0.92µs 35.3±1.00µs -32.86%
Array creation (Execution) 6.4±0.22ms 14.8±0.51ms -56.76%
Array pop (Execution) 2.4±0.08ms 8.7±0.15ms -72.41%
Create Realm 164.9±6.89µs 468.0±21.22µs -64.76%
Dynamic Object Property Access (Execution) 11.2±0.37µs 16.4±0.46µs -31.71%
Expression (Lexer) 1939.1±59.72ns 2.0±0.07µs -3.05%
Expression (Parser) 4.7±0.23µs 4.6±0.14µs +2.17%
Fibonacci (Execution) 1928.0±58.42µs 1987.4±64.63µs -2.99%
For loop (Execution) 54.4±1.93µs 62.9±4.31µs -13.51%
For loop (Lexer) 5.1±0.22µs 5.0±0.32µs +2.00%
For loop (Parser) 12.7±0.48µs 12.4±0.56µs +2.42%
Hello World (Lexer) 873.0±25.60ns 898.0±28.07ns -2.78%
Hello World (Parser) 2.1±0.09µs 2.1±0.09µs 0.00%
Long file (Parser) 5.8±0.12ms 5.7±0.16ms +1.75%
Object Creation (Execution) 10.4±0.43µs 14.6±0.32µs -28.77%
RegExp (Execution) 74.0±4.32µs 80.9±2.42µs -8.53%
RegExp Literal (Execution) 77.5±3.34µs 90.0±3.39µs -13.89%
RegExp Literal Creation (Execution) 72.5±3.28µs 81.6±3.01µs -11.15%
Static Object Property Access (Execution) 10.5±0.49µs 15.4±0.33µs -31.82%
String comparison (Execution) 10.4±0.23µs 18.8±0.41µs -44.68%
String concatenation (Execution) 8.7±0.35µs 15.0±0.44µs -42.00%
String copy (Execution) 7.1±0.27µs 12.5±0.42µs -43.20%
Symbols (Execution) 8.0±0.26µs 16.9±0.58µs -52.66%

@HalidOdat
Copy link
Member Author

HalidOdat commented Jun 14, 2020

We still don't have benchmarks for the specialized objects 😅 , Like Number object not primitive, the benchmarks for string don't test String object only string primitives. although the speed boost is really nice :)

Edit: Made some benchmarks for some specialized objects #494

@HalidOdat HalidOdat requested a review from Razican June 14, 2020 18:46
@github-actions
Copy link

Benchmark for 79188c1

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 25.8±0.79µs 37.0±1.89µs -30.27%
Array creation (Execution) 7.0±0.14ms 15.2±0.22ms -53.95%
Array pop (Execution) 2.5±0.05ms 9.2±0.24ms -72.83%
Create Realm 174.5±4.96µs 503.1±21.23µs -65.32%
Dynamic Object Property Access (Execution) 12.1±0.39µs 17.3±0.72µs -30.06%
Expression (Lexer) 2.1±0.04µs 2.1±0.07µs 0.00%
Expression (Parser) 5.1±0.19µs 5.0±0.11µs +2.00%
Fibonacci (Execution) 2.1±0.05ms 2.2±0.09ms -4.55%
For loop (Execution) 58.4±2.59µs 66.2±3.50µs -11.78%
For loop (Lexer) 5.3±0.07µs 5.4±0.16µs -1.85%
For loop (Parser) 13.9±0.34µs 13.6±0.35µs +2.21%
Hello World (Lexer) 930.5±17.10ns 933.0±38.21ns -0.27%
Hello World (Parser) 2.2±0.06µs 2.3±0.07µs -4.35%
Long file (Parser) 6.2±0.14ms 6.2±0.08ms 0.00%
Object Creation (Execution) 10.6±0.20µs 15.7±0.99µs -32.48%
RegExp (Execution) 80.6±4.23µs 86.3±3.13µs -6.60%
RegExp Literal (Execution) 81.9±1.54µs 94.8±5.87µs -13.61%
RegExp Literal Creation (Execution) 77.4±1.94µs 88.0±5.57µs -12.05%
Static Object Property Access (Execution) 11.0±0.41µs 16.5±0.86µs -33.33%
String comparison (Execution) 11.1±0.38µs 20.3±1.17µs -45.32%
String concatenation (Execution) 9.2±0.26µs 16.0±0.84µs -42.50%
String copy (Execution) 7.7±0.18µs 13.4±0.76µs -42.54%
Symbols (Execution) 8.7±0.28µs 17.9±0.61µs -51.40%

@jasonwilliams
Copy link
Member

jasonwilliams commented Jun 15, 2020

We should do a before and after with the profiler, it would be nice to see

@HalidOdat
Copy link
Member Author

HalidOdat commented Jun 15, 2020

@github-actions
Copy link

Benchmark for 3b70830

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 26.4±1.79µs 43.2±3.13µs -38.89%
Array creation (Execution) 6.2±0.41ms 14.4±1.47ms -56.94%
Array pop (Execution) 2.2±0.14ms 7.9±0.29ms -72.15%
Create Realm 175.2±12.25µs 453.5±29.14µs -61.37%
Dynamic Object Property Access (Execution) 11.8±0.64µs 16.8±1.15µs -29.76%
Expression (Lexer) 2.0±0.14µs 1886.1±130.45ns +6.04%
Expression (Parser) 4.4±0.35µs 4.4±0.30µs 0.00%
Fibonacci (Execution) 2.0±0.11ms 2.5±0.14ms -20.00%
For loop (Execution) 56.8±3.44µs 67.2±6.31µs -15.48%
For loop (Lexer) 4.8±0.31µs 4.9±0.34µs -2.04%
For loop (Parser) 13.2±0.84µs 12.6±0.90µs +4.76%
Hello World (Lexer) 901.6±64.70ns 887.5±75.48ns +1.59%
Hello World (Parser) 2.0±0.14µs 2.1±0.14µs -4.76%
Long file (Parser) 5.7±0.25ms 5.8±0.26ms -1.72%
Object Creation (Execution) 10.6±0.68µs 15.3±1.95µs -30.72%
RegExp (Execution) 77.2±6.14µs 80.7±4.90µs -4.34%
RegExp Literal (Execution) 81.5±7.13µs 88.3±6.26µs -7.70%
RegExp Literal Creation (Execution) 76.5±5.79µs 85.6±6.86µs -10.63%
Static Object Property Access (Execution) 10.7±0.63µs 15.1±1.36µs -29.14%
String comparison (Execution) 10.8±0.88µs 19.0±1.27µs -43.16%
String concatenation (Execution) 9.0±0.69µs 14.7±0.86µs -38.78%
String copy (Execution) 7.7±0.52µs 12.7±0.71µs -39.37%
Symbols (Execution) 8.3±0.60µs 16.6±1.14µs -50.00%

@github-actions
Copy link

Benchmark for c9dcfd8

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 29.9±2.92µs 42.9±5.09µs -30.30%
Array creation (Execution) 7.6±0.45ms 17.8±1.15ms -57.30%
Array pop (Execution) 2.9±0.22ms 10.0±0.67ms -71.00%
Create Realm 201.9±18.38µs 578.4±60.06µs -65.09%
Dynamic Object Property Access (Execution) 14.5±1.58µs 21.2±2.55µs -31.60%
Expression (Lexer) 2.4±0.22µs 2.6±0.34µs -7.69%
Expression (Parser) 5.6±0.43µs 5.9±0.65µs -5.08%
Fibonacci (Execution) 2.5±0.20ms 2.7±0.25ms -7.41%
For loop (Execution) 73.6±8.94µs 75.3±5.57µs -2.26%
For loop (Lexer) 5.9±0.64µs 6.4±0.82µs -7.81%
For loop (Parser) 14.9±1.02µs 16.4±2.32µs -9.15%
Hello World (Lexer) 1097.1±125.49ns 1117.3±131.36ns -1.81%
Hello World (Parser) 2.5±0.18µs 2.6±0.29µs -3.85%
Long file (Parser) 6.9±0.37ms 7.5±0.44ms -8.00%
Object Creation (Execution) 13.5±1.66µs 18.9±2.41µs -28.57%
RegExp (Execution) 97.2±14.62µs 113.0±16.63µs -13.98%
RegExp Literal (Execution) 103.2±33.48µs 124.1±26.69µs -16.84%
RegExp Literal Creation (Execution) 94.9±13.06µs 108.8±13.07µs -12.78%
Static Object Property Access (Execution) 14.0±1.95µs 20.3±2.94µs -31.03%
String comparison (Execution) 12.7±1.02µs 25.3±5.06µs -49.80%
String concatenation (Execution) 10.9±1.04µs 19.0±2.80µs -42.63%
String copy (Execution) 9.3±1.05µs 16.8±3.36µs -44.64%
Symbols (Execution) 10.6±1.05µs 21.8±2.36µs -51.38%

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 good to go from my side. We might want to wait for the extra benchmarks though, to have some extra info.

 - Added helper functions for Object and ValueData
 - Added `Hash` trait to `Value`
 - Abstracted Object field access
 - Deprecated `ObjectInternalMethods`
 - Optimized Realm creation
 - Fixed `Symbol` primitive
hash

The problem with using the pointer as the hash, it can become a security vulnerability.
This type change removes 8-bytes from Symbol type size.
 - Added `#[inline]` to some small functions
@HalidOdat HalidOdat force-pushed the feature/specialized-objects branch from ecd65b2 to 25572f5 Compare June 15, 2020 22:28
@github-actions
Copy link

Benchmark for 79c718a

Click to view benchmark
Test PR Benchmark Master Benchmark %
Array access (Execution) 24.7±1.52µs 37.8±0.82µs -34.66%
Array creation (Execution) 6.4±0.40ms 15.0±0.14ms -57.33%
Array pop (Execution) 2.4±0.05ms 9.0±0.10ms -73.33%
Boolean Object Access (Execution) 8.7±0.52µs 33.5±1.18µs -74.03%
Create Realm 163.5±10.21µs 492.9±12.97µs -66.83%
Dynamic Object Property Access (Execution) 11.1±0.71µs 17.3±0.45µs -35.84%
Expression (Lexer) 2.1±0.03µs 2.1±0.04µs 0.00%
Expression (Parser) 4.8±0.28µs 5.0±0.07µs -4.00%
Fibonacci (Execution) 1855.6±90.16µs 2.1±0.03ms -11.64%
For loop (Execution) 52.8±3.32µs 64.4±1.75µs -18.01%
For loop (Lexer) 4.8±0.26µs 5.3±0.13µs -9.43%
For loop (Parser) 13.7±0.46µs 13.5±0.26µs +1.48%
Hello World (Lexer) 855.4±50.32ns 922.0±34.64ns -7.22%
Hello World (Parser) 2.1±0.14µs 2.2±0.04µs -4.55%
Long file (Parser) 6.2±0.09ms 6.1±0.07ms +1.64%
Number Object Access (Execution) 7.2±0.49µs 28.9±0.47µs -75.09%
Object Creation (Execution) 9.7±0.52µs 15.6±0.52µs -37.82%
RegExp (Execution) 70.4±3.14µs 85.2±2.24µs -17.37%
RegExp Literal (Execution) 78.3±5.50µs 93.1±3.78µs -15.90%
RegExp Literal Creation (Execution) 74.2±5.83µs 84.8±1.93µs -12.50%
Static Object Property Access (Execution) 10.0±0.60µs 16.3±0.38µs -38.65%
String Object Access (Execution) 15.2±1.14µs 47.5±0.79µs -68.00%
String comparison (Execution) 11.1±0.31µs 20.2±0.49µs -45.05%
String concatenation (Execution) 9.2±0.13µs 15.9±0.24µs -42.14%
String copy (Execution) 7.7±0.22µs 13.2±0.28µs -41.67%
Symbols (Execution) 8.0±0.49µs 18.4±0.47µs -56.52%

@HalidOdat
Copy link
Member Author

Lets merge this :)

@HalidOdat HalidOdat merged commit df13272 into master Jun 15, 2020
@HalidOdat HalidOdat deleted the feature/specialized-objects branch June 15, 2020 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request performance Performance related changes and issues technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants