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

Remove vec-queue #566

Merged
merged 5 commits into from
Jul 15, 2020
Merged

Remove vec-queue #566

merged 5 commits into from
Jul 15, 2020

Conversation

Lan2u
Copy link

@Lan2u Lan2u commented Jul 15, 2020

Initial / prototype implementation just to see if this is having any impact.

Still todo:

  • Replace the pushed_back field with just using an array of size 4
  • Stop using .clone() on token and start using references as much as possible

@github-actions
Copy link

Benchmark for a27cde3

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 392.4±18.45ns 392.3±19.03ns +0.03%
Arithmetic operations (Full) 165.6±5.82µs 129.0±7.53µs +28.37%
Array access (Execution) 10.5±0.68µs 13.0±0.62µs -19.23%
Array access (Full) 190.3±10.89µs 180.3±8.02µs +5.55%
Array creation (Execution) 3.1±0.11ms 3.7±0.14ms -16.22%
Array creation (Full) 4.0±0.15ms 4.0±0.14ms 0.00%
Array pop (Execution) 1104.4±68.37µs 1332.2±66.20µs -17.10%
Array pop (Full) 2.0±0.07ms 1680.9±74.85µs +18.98%
Boolean Object Access (Execution) 5.2±0.21µs 4.9±0.20µs +6.12%
Boolean Object Access (Full) 183.4±5.68µs 136.9±7.15µs +33.97%
Create Realm 116.4±8.64µs 147.6±6.09µs -21.14%
Dynamic Object Property Access (Execution) 5.4±0.36µs 6.6±0.33µs -18.18%
Dynamic Object Property Access (Full) 188.5±10.28µs 141.1±11.91µs +33.59%
Expression (Lexer) 1623.2±145.78ns N/A N/A
Expression (Parser) 12.4±0.55µs 3.9±0.25µs +217.95%
Fibonacci (Execution) 752.3±34.76µs 940.7±29.16µs -20.03%
Fibonacci (Full) 1119.0±60.50µs 1098.2±55.46µs +1.89%
For loop (Execution) 17.3±1.47µs 21.5±0.83µs -19.53%
For loop (Full) 206.1±12.07µs 181.4±8.39µs +13.62%
For loop (Lexer) 7.7±0.20µs 4.1±0.25µs +87.80%
For loop (Parser) 35.7±1.28µs 10.5±0.78µs +240.00%
Goal Symbols (Parser) 21.6±0.87µs 6.6±0.36µs +227.27%
Hello World (Lexer) 1214.9±35.06ns 737.4±58.82ns +64.75%
Hello World (Parser) 5.6±0.41µs 1686.3±175.68ns +232.09%
Long file (Parser) 728.8±26.34ns 4.7±0.23ms -99.98%
Number Object Access (Execution) 3.3±0.27µs 3.8±0.31µs -13.16%
Number Object Access (Full) 218.5±6.72µs 169.8±10.94µs +28.68%
Object Creation (Execution) 4.7±0.28µs 5.8±0.26µs -18.97%
Object Creation (Full) 189.2±11.38µs 187.4±9.24µs +0.96%
RegExp (Execution) 56.4±3.54µs 69.0±3.00µs -18.26%
RegExp (Full) 320.2±10.32µs 300.0±14.67µs +6.73%
RegExp Literal (Execution) 58.8±2.68µs 74.3±3.00µs -20.86%
RegExp Literal (Full) 273.0±9.26µs 213.7±17.09µs +27.75%
RegExp Literal Creation (Execution) 56.0±3.43µs 68.4±3.69µs -18.13%
RegExp Literal Creation (Full) 296.6±6.96µs 242.0±22.57µs +22.56%
Static Object Property Access (Execution) 4.9±0.41µs 6.0±0.25µs -18.33%
Static Object Property Access (Full) 173.3±8.98µs 156.8±8.84µs +10.52%
String Object Access (Execution) 8.1±0.37µs 8.2±0.38µs -1.22%
String Object Access (Full) 185.4±5.38µs 140.2±8.66µs +32.24%
String comparison (Execution) 5.9±0.55µs 6.1±0.29µs -3.28%
String comparison (Full) 187.9±7.89µs 136.5±6.74µs +37.66%
String concatenation (Execution) 4.3±0.23µs 5.4±0.25µs -20.37%
String concatenation (Full) 175.5±5.53µs 150.5±16.50µs +16.61%
String copy (Execution) 4.3±0.43µs 4.4±0.16µs -2.27%
String copy (Full) 175.2±4.52µs 132.3±9.43µs +32.43%
Symbols (Execution) 3.1±0.14µs 3.9±0.18µs -20.51%
Symbols (Full) 158.9±10.97µs 154.9±6.44µs +2.58%

@Lan2u
Copy link
Author

Lan2u commented Jul 15, 2020

Initial benchmark seems to indicate an improvement, will continue to refine this.

@github-actions
Copy link

Benchmark for 0611283

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 439.1±19.18ns 461.9±24.01ns -4.94%
Arithmetic operations (Full) 178.0±8.39µs 177.0±4.92µs +0.56%
Array access (Execution) 14.4±0.52µs 14.4±0.41µs 0.00%
Array access (Full) 211.7±7.01µs 197.7±4.50µs +7.08%
Array creation (Execution) 3.9±0.07ms 4.0±0.07ms -2.50%
Array creation (Full) 4.4±0.08ms 4.4±0.08ms 0.00%
Array pop (Execution) 1468.4±24.52µs 1485.4±20.18µs -1.14%
Array pop (Full) 2.2±0.08ms 1863.2±98.22µs +18.08%
Boolean Object Access (Execution) 5.4±0.18µs 5.5±0.16µs -1.82%
Boolean Object Access (Full) 196.1±7.30µs 185.7±7.63µs +5.60%
Create Realm 156.5±4.38µs 162.3±13.22µs -3.57%
Dynamic Object Property Access (Execution) 7.4±0.26µs 7.3±0.12µs +1.37%
Dynamic Object Property Access (Full) 197.2±7.58µs 193.1±11.87µs +2.12%
Expression (Lexer) 2.2±0.08µs N/A N/A
Expression (Parser) 12.6±0.44µs 5.3±0.27µs +137.74%
Fibonacci (Execution) 1036.6±43.95µs 1025.8±28.16µs +1.05%
Fibonacci (Full) 1256.7±36.53µs 1258.8±56.75µs -0.17%
For loop (Execution) 23.3±1.00µs 23.5±0.73µs -0.85%
For loop (Full) 223.9±11.08µs 202.8±4.20µs +10.40%
For loop (Lexer) 8.3±0.52µs 5.6±0.16µs +48.21%
For loop (Parser) 38.7±1.33µs 14.1±0.39µs +174.47%
Goal Symbols (Parser) 23.4±0.89µs 8.8±0.19µs +165.91%
Hello World (Lexer) 1279.9±32.36ns 982.2±40.03ns +30.31%
Hello World (Parser) 6.0±0.37µs 2.3±0.08µs +160.87%
Long file (Parser) 782.6±21.93ns 6.4±0.31ms -99.99%
Number Object Access (Execution) 4.3±0.09µs 4.2±0.13µs +2.38%
Number Object Access (Full) 231.6±7.21µs 234.1±8.09µs -1.07%
Object Creation (Execution) 6.5±0.24µs 6.6±0.24µs -1.52%
Object Creation (Full) 213.4±5.43µs 210.0±6.86µs +1.62%
RegExp (Execution) 76.5±4.10µs 76.0±1.95µs +0.66%
RegExp (Full) 324.0±11.06µs 319.0±10.73µs +1.57%
RegExp Literal (Execution) 81.3±3.72µs 80.5±2.45µs +0.99%
RegExp Literal (Full) 278.9±10.88µs 274.5±9.69µs +1.60%
RegExp Literal Creation (Execution) 76.6±3.07µs 77.7±5.49µs -1.42%
RegExp Literal Creation (Full) 317.7±7.60µs 320.1±14.21µs -0.75%
Static Object Property Access (Execution) 6.7±0.25µs 6.7±0.22µs 0.00%
Static Object Property Access (Full) 194.6±9.21µs 187.4±4.49µs +3.84%
String Object Access (Execution) 9.1±0.25µs 9.0±0.20µs +1.11%
String Object Access (Full) 196.6±6.20µs 190.1±6.08µs +3.42%
String comparison (Execution) 7.2±0.35µs 7.1±0.18µs +1.41%
String comparison (Full) 198.3±8.82µs 190.6±6.49µs +4.04%
String concatenation (Execution) 5.9±0.22µs 6.0±0.21µs -1.67%
String concatenation (Full) 187.8±7.87µs 184.5±4.22µs +1.79%
String copy (Execution) 4.9±0.22µs 4.9±0.22µs 0.00%
String copy (Full) 181.5±5.99µs 184.0±9.02µs -1.36%
Symbols (Execution) 4.3±0.40µs 4.2±0.09µs +2.38%
Symbols (Full) 174.9±14.74µs 172.7±8.29µs +1.27%

@Lan2u Lan2u merged commit 985f68e into new_lexer Jul 15, 2020
@Razican Razican added enhancement New feature or request parser Issues surrounding the parser labels Jul 15, 2020
@Lan2u Lan2u deleted the new_lexer_no_heap_peek branch July 17, 2020 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants