-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[Core] Use Vector
for MethodInfo::arguments
#91660
Open
AThousandShips
wants to merge
1
commit into
godotengine:master
Choose a base branch
from
AThousandShips:methodinfo_vec
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+114
−131
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AThousandShips
force-pushed
the
methodinfo_vec
branch
from
June 4, 2024 09:09
c466479
to
82fc7ae
Compare
AThousandShips
force-pushed
the
methodinfo_vec
branch
from
June 19, 2024 09:15
82fc7ae
to
78015f3
Compare
AThousandShips
force-pushed
the
methodinfo_vec
branch
from
August 15, 2024 14:48
78015f3
to
c9e6497
Compare
AThousandShips
force-pushed
the
methodinfo_vec
branch
2 times, most recently
from
August 29, 2024 18:12
aefa43f
to
8f5e6aa
Compare
AThousandShips
changed the title
[Core] Use
[Core] Use Aug 29, 2024
LocalVector
for MethodInfo::arguments
Vector
for MethodInfo::arguments
AThousandShips
force-pushed
the
methodinfo_vec
branch
from
October 4, 2024 11:36
8f5e6aa
to
9e60dd5
Compare
AThousandShips
force-pushed
the
methodinfo_vec
branch
from
November 14, 2024 16:54
9e60dd5
to
bf778b4
Compare
KoBeWi
reviewed
Dec 5, 2024
AThousandShips
force-pushed
the
methodinfo_vec
branch
2 times, most recently
from
December 5, 2024 17:39
3d7856f
to
6a426eb
Compare
KoBeWi
approved these changes
Dec 5, 2024
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 correct.
I wonder if it's worth it to switch to range iterators everywhere, i.e.
int i = 0;
for (const PropertyInfo &pi : method.arguments) {
// stuff
i++;
}
Avoids indexing the Vector, although it's cheap anyway.
Worth looking at yeah |
AThousandShips
force-pushed
the
methodinfo_vec
branch
2 times, most recently
from
December 12, 2024 12:40
3e05520
to
ccfc923
Compare
AThousandShips
force-pushed
the
methodinfo_vec
branch
from
December 12, 2024 16:16
ccfc923
to
eb55f53
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One of the bigger offenders when it comes to using a bidirectional data type for random-access purposes, there aren't really any good reasons to use a
List
here that I can tell, we never do any insertions or erasures on it (one case inNode
but it wasn't necessary, and IMO worsened readability)Nothing should really change here except improving some data management, and locality, and making accessing the arguments easier, performance should be unaffected either way but haven't done any direct testing on that part, but I don't think this data is used in critical paths anyway
Follow-up to:
List
#90705