Skip to content

Improve performance #38

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

Merged
merged 3 commits into from
Aug 4, 2020
Merged

Improve performance #38

merged 3 commits into from
Aug 4, 2020

Conversation

nalimilan
Copy link
Member

@nalimilan nalimilan commented Jul 10, 2020

Add optimized readbytes! method which copies data by chunks instead of byte per byte.
Internally, avoid passing a SubArray to readbytes! as there is currently no optimized method for them: instead, wrap the corresponding memory in an Array.
Increase the size of the buffer from 100 to 200 bytes, which appears to be a good tradeoff.
This makes loading a file about 10 times faster than before.

See also JuliaLang/julia#36607.

Add optimized `readbytes!` method which copies data by chunks instead of byte per byte.
Internally, avoid passing a `SubArray` to `readbytes!` as there is currently no optimized
method for them: instead, wrap the corresponding memory in an `Array`.
Increase the size of the buffer from 100 to 200 bytes, which appears to be a good tradeoff.
This makes loading a file about 10 times faster than before.
@nalimilan nalimilan changed the title Nl/readbytes! Improve performance Jul 10, 2020
@nalimilan nalimilan merged commit f658892 into master Aug 4, 2020
@nalimilan nalimilan deleted the nl/readbytes! branch August 4, 2020 08:57
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