Skip to content

Interpolate stateless regexps just once - #601

Merged
gettalong merged 1 commit into
gettalong:masterfrom
ashmaroli:interpolate-stateless-regexps-once
May 15, 2019
Merged

Interpolate stateless regexps just once#601
gettalong merged 1 commit into
gettalong:masterfrom
ashmaroli:interpolate-stateless-regexps-once

Conversation

@ashmaroli

Copy link
Copy Markdown
Contributor

If an interpolated regular expression within a method definition and if the interpolation doesn't depend on the state of the instance, then they should essentially be interpolated just once to avoid multiple allocations and every call to the associated method.

@gettalong gettalong self-assigned this May 15, 2019
@gettalong
gettalong merged commit 41d20e1 into gettalong:master May 15, 2019
@gettalong

Copy link
Copy Markdown
Owner

Thanks for your contribution - I have merged the changes!

@ashmaroli
ashmaroli deleted the interpolate-stateless-regexps-once branch May 15, 2019 10:50
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

Successfully merging this pull request may close these issues.

2 participants