You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
buffer =IOBuffer("A"^50000)
g =addgroup!(SUITE, "readuntil")
for len in (1, 2, 1000, 50000)
g["target length $len"] =@benchmarkablereaduntil(seekstart($buffer), $("A"^ len))
end
Reading 2-byte strings from an IOBuffer probably got slower because of this diff, which traded off worse performance for reading extremely short lines for better performance reading lines with 20 characters or more. (See the comment "A single loop is 2x faster for nout=5.") Actually that portion of the PR sholdn't be relevant here because that is only for delim::UInt8, whereas this function uses a string delimiter, which is a completely different part of the codebase.
(In general, my feeling is that if you care about performance for reading lots of very short strings, you are better off using the new functionality with something like StringViews.jl to read the strings in-place into a re-used buffer.)
run(BaseBenchmarks.SUITE[["string", "readuntil", "target length 2"]])
regressed in #48273 @stevengj it gained some allocations and became 2x slower.The text was updated successfully, but these errors were encountered: