-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
use a type parameter for stream in EachLine, improves performance #28253
Conversation
Not sure this is tracked but might as well @nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
base/io.jl
Outdated
end | ||
EachLine(stream::IO=stdin; ondone::Function=()->nothing, keep::Bool=false) = | ||
EachLine(stream, ondone, keep) |
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.
This line should be unindented one level as well.
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.
I'll try fix it before merging with ci skip to not waste CI.
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.
I think this should remain inside the struct
block so we don't expose a 3-argument EachLine
method.
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.
Fixed
a646584
to
1a54d7d
Compare
While at it, we could consider also making the type of |
I thought about it but it is only called once, right, so I felt that it probably wasn't needed. |
Same feeling here, just wanted to make sure it's at least considered. |
From @martinholters idea in #19141 (comment)
File at https://raw.githubusercontent.com/diegozea/mitos-benchmarks/master/data/PF00089.fasta
Before:
After:
Julia 0.6