-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add readuntil benchmarks #119
Conversation
|
||
buffer = IOBuffer(("bar" ^ 20000) * "ians") | ||
target = ("bar" ^ 300) * "ian" | ||
g["barbarian backtrack"] = @benchmarkable readuntil(seekstart($buffer), $target) |
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.
Good name
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.
In my quest for good backtracking words to use I also found:
- assassin
- cincinatti
- conconscious
- murmurously
- reprepare
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.
Wow, all good names.
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.
Looks reasonable to me
src/string/StringBenchmarks.jl
Outdated
target = ("A" ^ 5000) * "Z" | ||
g["backtracking"] = @benchmarkable readuntil(seekstart($buffer), $target) | ||
|
||
buffer = IOBuffer(randstring('A':'X', 40000) * target) |
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.
use randstring(RandUtils.SEED, 'A':'X', 40000)
for stable random values
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.
actually, looks like it should be String(rand(RandUtils.SEED, 'A':'X', 40000))
, so it works on v0.5 and v0.6 too?
* Fix time function qualification * Update ExecutionTests.jl
See JuliaLang/julia#20621