Title: astutils.cpp: optimized visitAstNodesGeneric() a bit by firewave · Pull Request #3716 · cppcheck-opensource/cppcheck · GitHub
Open Graph Title: astutils.cpp: optimized visitAstNodesGeneric() a bit by firewave · Pull Request #3716 · cppcheck-opensource/cppcheck
X Title: astutils.cpp: optimized visitAstNodesGeneric() a bit by firewave · Pull Request #3716 · cppcheck-opensource/cppcheck
Description: I tested this with cli/filelister.cpp. I wanted to test it with more files but with all the recent performance regressions it's agonizing slow while running in valgrind. The initial Ir count was 353,306,619. Reducing the std::stack operations by not adding nullptr entries reduced it to 334,276,673 even though the checks added some overhead. Switching the backend of the std::stack from std::deque to std::vector reduced it to 293,371,232. The main problem is that the construction of a std::deque is much more expensive. The destruction cost stays the same. So in total this saves us about 12% of the Ir count. The main issue here still remains the creation and destruction of std::stack which still amounts to more than 22% of the total Ir count. So it's the same issue we are seeing with short-living small std::vector as related to in #3432. It is also still the single most expensive function we call.
Open Graph Description: I tested this with cli/filelister.cpp. I wanted to test it with more files but with all the recent performance regressions it's agonizing slow while running in valgrind. The initial Ir count wa...
X Description: I tested this with cli/filelister.cpp. I wanted to test it with more files but with all the recent performance regressions it's agonizing slow while running in valgrind. The initial Ir coun...
Opengraph URL: https://github.com/cppcheck-opensource/cppcheck/pull/3716
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d619f66c-e70c-8ab4-917c-29d19cd62991 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA1A:CB81E:523AF70:72CBB17:6A50F8DC |
| html-safe-nonce | b3e7e62b741be6101c5b3e11c105f9346a6028be8851eec8c30ca020a3780774 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTFBOkNCODFFOjUyM0FGNzA6NzJDQkIxNzo2QTUwRjhEQyIsInZpc2l0b3JfaWQiOiI3Nzg4MTYxMzg2MTQwNDY1MzcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 22add3a50f4e7fc8704a6606bc9b86d4445b1c4d0b7aa623df90ec844f6fa73e |
| hovercard-subject-tag | pull_request:823967716 |
| 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/3716/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 | I tested this with cli/filelister.cpp. I wanted to test it with more files but with all the recent performance regressions it's agonizing slow while running in valgrind. The initial Ir count wa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| 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 | 8d836581d020676cc0ef4a83cd2fe17e4af02c3d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width