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
Improve Skeleton3D::find_bone()
performance
#77307
Improve Skeleton3D::find_bone()
performance
#77307
Conversation
4d3bd63
to
bbe292c
Compare
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.
@44zb LGTM besides the PR/commit title. No need for these to link to the issue being fixed (#75915)(it could be done in the PR/commit description). Also more human-readable titles are preferred. So I suggest changing both PR title and commit title (first line of the commit message) to e.g. "Improve Skeleton3D::find_bone() performance".
Also seems like there's some formatting issue, should be addressed too (see the failing test)(Yeah, I suggested it like that, oops! 🙃).
bbe292c
to
8cccf7f
Compare
@44zb Oh, you actually still haven't changed the commit message, it's still "Skeleton3D::find_bone() performance #75915". You can change it when rebasing by using |
8cccf7f
to
f645eee
Compare
@kleonc yes, sorry missed the commit part. But now it's all good :) |
As long as this works for all the input cases and the performance is faster I'm fine with it. I don't think this portion of the code requires special memory allocation strategies like not allocating. |
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.
Looks great!
Skeleton3D::find_bone()
performance
Thanks! And congrats for your first merged Godot contribution 🎉 |
Cherry-picked for 4.0.4 with #77874. |
Indexing Skeleon3D bones using HashMap
results of the script from #75915 before/after this fix
before
Time find_bone(): 1055
Time Dictionary: 59
After
Time find_bone(): 65
Time Dictionary: 57
Fix #75915