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] swap out bool with is None in induced_slot #331

Merged
merged 8 commits into from
Jul 29, 2024

Conversation

sneakers-the-rat
Copy link
Contributor

More free perf!

Since the iteration over all the metaslots happens so many times, it turns out that the time in JsonObj.__bool__ is actually appreciable. A simple swap out with is None gives us a 137% perf boost for free :)

lots more perf to be had in this method in a fuller refactor but wanted to get this one in here since it's so uncontroversial, should be quick review

before (__bool__ in pink):
Screenshot 2024-07-23 at 8 52 20 PM

after (__bool__ not present anymore):
Screenshot 2024-07-23 at 9 06 56 PM

@cmungall cmungall merged commit 81b3c62 into linkml:main Jul 29, 2024
7 checks passed
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