8000 Optimizations for tuples using. Removed unused types transformations. by umax · Pull Request #263 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

Optimizations for tuples using. Removed unused types transformations. #263

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

Merged
merged 1 commit into from
Mar 28, 2018

Conversation

umax
Copy link
Contributor
@umax umax commented Mar 26, 2018

Simple optimizations of tuple using.

labels = []
self._labelnames = tuple(labels)

self._labelnames = tuple(labels or [])
Copy link
Contributor

Choose a reason for hiding this comment

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

What performance difference does this make?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No difference, just more shorted and more Pythonyc.
If you prefer, I can remove this changes from PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine as-is, and I'd expect it to be faster this way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@umax umax force-pushed the optimize-use-of-tuples branch from cdbbdbb to a84ba47 Compare March 26, 2018 13:49
@brian-brazil brian-brazil merged commit 1a16fd0 into prometheus:master Mar 28, 2018
@brian-brazil
Copy link
Contributor

Thanks!

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
0