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

reader: update fread call improve byte-reader perf #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scolsen
Copy link
Member

@scolsen scolsen commented Apr 22, 2022

This change was motivated by the performance of the original byte-reader
implementation, which was quite slow since it read a file one byte at a
time. Using fread instead, we can net some performance gains.

This currently depends on a signature change to fread in Carp's core
library which isn't at HEAD yet, so that blocks this change. Assuming
that change merges into upstream, we need to also update the
string-reader implementation--this commit handles that as well.

This change was motivated by the performance of the original byte-reader
implementation, which was quite slow since it read a file one byte at a
time. Using fread instead, we can net some performance gains.

This currently depends on a signature change to fread in Carp's core
library which isn't at HEAD yet, so that blocks this change. Assuming
that change merges into upstream, we need to also update the
string-reader implementation--this commit handles that as well.
@scolsen
Copy link
Member Author

scolsen commented Apr 22, 2022

note: depends on carp-lang/Carp#1421

Copy link
Member

@hellerve hellerve left a comment

Choose a reason for hiding this comment

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

Simplifies the code, too! I like it!

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.

None yet

2 participants