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

perf: remove usage of named attribute accesses on bunches #1

Conversation

naterush
Copy link

@naterush naterush commented Oct 21, 2022

Following the investigation in this comment, this PR removes any usage of bunch.name within traitlets. It's about a 12 character change in total, but for some specific (extremely artificial) benchmarks that have a lot of value changes + some observers on a traitlet, you can get a modest reduction in runtime.

This PR is totally backwards compatible: it does not change the Bunch interface. It just uses bunches differently internally for a free performance benefits.

I can update this PR to the main branch on the traitlets repo once ipython#777 is merged :-)

@maartenbreddels
Copy link
Owner

Cool! You can also open a PR on the traitlets repo, and once my branch is merged you can rebase.

@maartenbreddels maartenbreddels force-pushed the perf_construction branch 2 times, most recently from 4324bbb to 1c85d41 Compare December 8, 2022 15:18
@naterush naterush closed this Dec 19, 2024
@naterush naterush reopened this Dec 19, 2024
@naterush naterush closed this Dec 19, 2024
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