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

Minor refactor of labelers #55

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Minor refactor of labelers #55

merged 3 commits into from
Jan 23, 2025

Conversation

aazuspan
Copy link
Owner

Related issue

Description

Minor refactor and a micro-optimization to _build_band_label.

Checklist

  • I have updated the CHANGELOG with any added features, changes, fixes, or removals.

Omitting the callable to filter is substantially faster than the
identity lambda, and slightly faster than a list comprehension.
Directly joining the filter is slightly faster than using a
placeholder list.

Per iteration:

Old version: 527 ns
New version: 305 ns
@aazuspan aazuspan self-assigned this Jan 23, 2025
@aazuspan aazuspan merged commit 3215f13 into main Jan 23, 2025
6 checks passed
@aazuspan aazuspan deleted the refactor branch January 23, 2025 01:43
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.

1 participant