Skip to content

Reserve a vector where we know the size. #22077

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

Merged
merged 2 commits into from
Feb 6, 2019
Merged

Conversation

shahzadlone
Copy link
Contributor

Saving reallocation cost (sorry this is too minor but it bothered me that we weren't reserving when we know the size in advance.).

@jrose-apple jrose-apple requested a review from nkcsgexi January 24, 2019 01:51
@jrose-apple
Copy link
Contributor

That's fair. I will do the temp. Sorry I am super new to swift code base, could you guide me to where the most time-sensitive code might be? I would love to look at improving some performance critical code =)

I don't think we have one obvious hot spot these days, but things in lib/* are more likely to be part of the compiler proper, and there's a fair amount of code that runs as part of code completion and thus needs to be quick. That said, if you want to get a feel for the code base without necessarily working on performance, I recommend picking one of the unassigned Starter Bugs on our bug tracker.

@shahzadlone
Copy link
Contributor Author

@jrose-apple Do you need anything else from my side?

@jrose-apple
Copy link
Contributor

Ah, it looks good to me, but this is an area of the code @nkcsgexi is more familiar with, so I wanted him to at least get a chance to look, for all that it's a trivial change.

@shahzadlone
Copy link
Contributor Author

Is this still in progress?

@CodaFi
Copy link
Contributor

CodaFi commented Feb 5, 2019

Do you still want us to merge this, or have you moved on to another bug?

@shahzadlone
Copy link
Contributor Author

This is still a valuable merge. so you should merge this. Anything else I have I will do that in an other PR

@CodaFi
Copy link
Contributor

CodaFi commented Feb 6, 2019

Alright. I’ll squash this myself

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Feb 6, 2019

⛵️

@CodaFi CodaFi merged commit 1e7fba7 into swiftlang:master Feb 6, 2019
@shahzadlone
Copy link
Contributor Author

Thanks for the merge!

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.

3 participants