Skip to content

reserve() before push_back() in loop - #1202

Open
MichaelChirico wants to merge 2 commits into
stan-dev:developfrom
MichaelChirico:patch-2
Open

MichaelChirico wants to merge 2 commits into
stan-dev:developfrom
MichaelChirico:patch-2

Conversation

@MichaelChirico

Copy link
Copy Markdown

Summary:

See https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html

Intended Effect:

Small performance improvement for effective_sample_size2() routine.

How to Verify:

https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html

Side Effects:

None

Documentation:

N/A

Reviewer Suggestions:

N/A

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Google LLC

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

This branch has not been deployed

No deployments
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.

1 participant