-
-
Notifications
You must be signed in to change notification settings - Fork 139
perf: use ValueListBuilder<T> for constant buffers
#1529
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
Conversation
cdc306a to
a706675
Compare
a2ae394 to
e5e79b2
Compare
e5e79b2 to
7eafa6e
Compare
Nice little performance gain and saves 1.5 MB on the complex code benchmark, it used to be larger before #1535 I'll look into doing this for the variable size buffers later. Before
After
When combined with #1524 (timing is inaccurate)
|
7eafa6e to
e0f9228
Compare
61eee2f to
eefc829
Compare
belav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opted to append each item to keep similar formatting
That is the option I would have gone for. I think it keeps it cleaner. I also like consolidating the logic for dealing with Concat with 0, 1 or more items. Nice work!
I knew doing this in gh was a bad idea.
Follow on from #1502, using
ValueListBuilderto replace knownList<Doc>sizes.Concattypes for children lengths #1524@belav what do you think the best way of replacing a list that uses a collection initializer is?
I can either add the items directly into the scratch buffer and manually update
LengthOr create the buffer and then append the items via params.
Or Append each item