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

Encoder: Maybe speed up stream row buffer #193

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

Ostrzyciel
Copy link
Member

I thought that ArrayBuffer in Scala is smart enough to NOT allocate things if it still has existing capacity, but somehow in the profiler I'm reading a lot of allocations there. Let's try a custom implementation of the row buffer – as simple as possible.

If this works, I will finish the docstrings. If not, I will revert it.

I thought that ArrayBuffer in Scala is smart enough to NOT allocate things if it still has existing capacity, but somehow in the profiler I'm reading a lot of allocations there. Let's try a custom implementation of the row buffer – as simple as possible.

If this works, I will finish the docstrings. If not, I will revert it.
@Ostrzyciel
Copy link
Member Author

  • We should also add tests for the FastBuffer class, to be 100% sure it works correctly with expanding capacity...

@Ostrzyciel Ostrzyciel merged commit de8ed33 into main Oct 22, 2024
3 of 4 checks passed
@Ostrzyciel Ostrzyciel deleted the faster-row-buffer branch October 22, 2024 22:15
Ostrzyciel added a commit that referenced this pull request Oct 22, 2024
This reverts commit de8ed33.

This is not faster at all. Turned out my profiler was showing the wrong call trace.
I could maybe do some slight optimization vs the ArrayBuffer, but it would be tiny. Let's leave it as it is.
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.

1 participant