-
Notifications
You must be signed in to change notification settings - Fork 3k
Micro-optimizations #1957
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
Micro-optimizations #1957
Conversation
|
Thanks @scop ! |
There likely isn't actually more than once to split in the source strings in these cases, but avoid doing so anyway as we're only interested in the first.
The target is not to be changed while outputting completions, so resolve it only once.
The enablement state is not to be changed during completion output, so evaluate it only once.
|
Rebased and added some more. |
marckhouzam
left a comment
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.
LGTM
But I’m not near a computer right now so I’ll wait until I can test it to merge.
@jpmcb if you’re comfortable merging, go right ahead
Noticed while looking into something else. No benchmarks/numbers done, but even if this wouldn't yield measurable improvements, the changes don't hurt readability IMO and actually in a sense they convey the intent better.