Title: smallvector.h: bake `reserve()` into the non-boost `SmallVector` implementation by firewave · Pull Request #4385 · cppcheck-opensource/cppcheck · GitHub
Open Graph Title: smallvector.h: bake `reserve()` into the non-boost `SmallVector` implementation by firewave · Pull Request #4385 · cppcheck-opensource/cppcheck
X Title: smallvector.h: bake `reserve()` into the non-boost `SmallVector` implementation by firewave · Pull Request #4385 · cppcheck-opensource/cppcheck
Description: This changes bakes the reserve() call into the non-boost implementation SmallVector construction as it would cause a performance regression with the boost::small_vector implementation (see #3919). I tested the build with Clang, GCC, MinGW and Visual Studio. Replacing the std::vector + resreve() appraoch with SmallVector in visitAstNodes() will now yield the same performance when using Clang. In case of GCC the code actually gets faster since (according to valgrind) it was previously using std::vector<>::reserve(unsigned long) whereas it now uses operator new(unsigned long) just like Clang does. Possibly another issue to report upstream. Clang 14 2,481,264,505 -> 2,481,270,375 GCC 12 2,388,141,113 -> 2,359,483,453 This patch does not replace the usage yet - that still requires a few more tests and is handled via #3919.
Open Graph Description: This changes bakes the reserve() call into the non-boost implementation SmallVector construction as it would cause a performance regression with the boost::small_vector implementation (see #3919). ...
X Description: This changes bakes the reserve() call into the non-boost implementation SmallVector construction as it would cause a performance regression with the boost::small_vector implementation (see #3919). ...
Opengraph URL: https://github.com/cppcheck-opensource/cppcheck/pull/4385
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:643261b1-2eed-bd27-b72d-93bbaaab8917 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 92EA:10F0C1:14DA1A7:1E580AF:6A4E46D1 |
| html-safe-nonce | 1d053563ff1955344fe2e930a185a56022c9373e574081c45d57d80eda4f23c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkVBOjEwRjBDMToxNERBMUE3OjFFNTgwQUY6NkE0RTQ2RDEiLCJ2aXNpdG9yX2lkIjoiNjgzOTQxMTQxMjYyNTY3MTg4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b931a007fc528f047e823bfe96254fcddb0bd2157af53850b3a067ad73eb7972 |
| hovercard-subject-tag | pull_request:1031207841 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/cppcheck-opensource/cppcheck/pull/4385/files |
| twitter:image | https://avatars.githubusercontent.com/u/242857?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/242857?s=400&v=4 |
| og:image:alt | This changes bakes the reserve() call into the non-boost implementation SmallVector construction as it would cause a performance regression with the boost::small_vector implementation (see #3919). ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/cppcheck-opensource/cppcheck git https://github.com/cppcheck-opensource/cppcheck.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 143131 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/cppcheck |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 143131 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/cppcheck |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9fabff9b8b127e686a3ec86f91422e818056ca2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width