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

Fixes case handling in regex simplification. #1950

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

cyriltovena
Copy link
Contributor

Since the optimization (?i)foo is not case insensitive anymore. My bad. This will fix it.

Performance wise :

Benchmark_LineFilter/default_true_(?i)foo-16       	  451669	      2644 ns/op	       0 B/op	       0 allocs/op
Benchmark_LineFilter/simplified_true_(?i)foo-16    	 6372139	       183 ns/op	     128 B/op	       1 allocs/op

I take that allocation every day ✌️

Signed-off-by: Cyril Tovena [email protected]

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

LGTM!

@cyriltovena cyriltovena merged commit 15c4ebb into grafana:master Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants