Skip to content

avoid unnecessary copies with emplace_back()#4450

Merged
orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom
firewave:cleanup-push-xx
Sep 10, 2022
Merged

avoid unnecessary copies with emplace_back()#4450
orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom
firewave:cleanup-push-xx

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Sep 7, 2022

This is split from similar changes for push_back() as some of those caused sizable regressions which need to be investigated first :( This is another step in preparation of applying the misc-const-correctness clang-tidy-16 fixes.

The impact is neglectable but there are no regressions.

Performing a --enable=all --inconclusive scan on mame_regtest.

With DISABLE_VALUEFLOW=1:

GCC 12 1,849,957,730 -> 1,849,441,950
Clang 14 1,901,388,783 -> 1,901,388,929

With Valueflow enabled:

Clang 14 50,981,418,024 -> 50,988,014,183
GCC 12 54,791,127,471 -> 54,794,443,556

And scanning cli with --enable=all --inconclusive -Ilib -D __GNUC__ and DISABLE_VALUEFLOW=1

GCC 12 3,216,157,747 -> 3,215,371,284
Clang 14 3,178,610,619 -> 3,178,527,042

@orbitcowboy orbitcowboy merged commit 76d1b9f into cppcheck-opensource:main Sep 10, 2022
@firewave firewave deleted the cleanup-push-xx branch September 11, 2022 18:31
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