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

Improve Interval parsing performance #131

Open
omus opened this issue Jul 14, 2020 · 0 comments
Open

Improve Interval parsing performance #131

omus opened this issue Jul 14, 2020 · 0 comments

Comments

@omus
Copy link
Collaborator

omus commented Jul 14, 2020

Interval parsing support was added in #128 using regular expressions. Usually we can get better performance and reduced allocations if we write a lower-level parser instead of using general regular expressions. The current performance is:

julia> using Intervals, BenchmarkTools

julia> @btime parse(Interval{Int}, "[1,2)")
  734.102 ns (13 allocations: 656 bytes)
Interval{Int64,Closed,Open}(1, 2)
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

No branches or pull requests

1 participant