Skip to content

Conversation

@TIHan
Copy link
Contributor

@TIHan TIHan commented Jan 16, 2020

Uses ArrayPool for AssocTable since we are allocating a large int array every time we want to parse anything.
Untitled

let reductions = tables.reductions
let actionTable = new AssocTable(tables.actionTableElements, tables.actionTableRowOffsets)
let gotoTable = new AssocTable(tables.gotos, tables.sparseGotoTableRowOffsets)
let cacheSize = 7919 // the 1000'th prime
Copy link
Contributor

Choose a reason for hiding this comment

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

Lol what?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea :) - I just copied what was there.

Copy link
Contributor

Choose a reason for hiding this comment

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

fair enough

Copy link
Contributor

@cartermp cartermp left a comment

Choose a reason for hiding this comment

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

Style nits, one of which should impact debuggability I think.

we are allocating a large int array every time we want to parse anything.

Is there some trace data or benchmark that shows the impact of this?

@TIHan
Copy link
Contributor Author

TIHan commented Jan 16, 2020

@cartermp Added trace data

@baronfel
Copy link
Member

tagging myself so I can know to wait for this before releasing the next FCS.

@cartermp cartermp mentioned this pull request Jan 16, 2020
10 tasks
@cartermp cartermp merged commit 88c7a2b into dotnet:master Jan 17, 2020
@cartermp cartermp mentioned this pull request Sep 6, 2020
4 tasks
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* Using ArrayPool

* Remove open

* Changed some style nits

* Clear arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants