Title: Add caching of conditional directive chains by glankk · Pull Request #468 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Add caching of conditional directive chains by glankk · Pull Request #468 · cppcheck-opensource/simplecpp
X Title: Add caching of conditional directive chains by glankk · Pull Request #468 · cppcheck-opensource/simplecpp
Description: Adds caching for elif, else, and endif tokens that follow if, elif, and else the first time they're processed, so that the preprocessor can jump directly to them the next time the conditional block should be skipped. The next conditional token is cached in the previous token's mutable const Token *nextcond. Having a public mutable member is a bit awkward but seemed like the best solution. The alternative would be to make nextcond private and make preprocess a friend, or make preprocess take a non-const TokenList. In the test case that I used for #447 this change brings the runtime down from over 12 minutes to less than one minute.
Open Graph Description: Adds caching for elif, else, and endif tokens that follow if, elif, and else the first time they're processed, so that the preprocessor can jump directly to them the next time the conditional b...
X Description: Adds caching for elif, else, and endif tokens that follow if, elif, and else the first time they're processed, so that the preprocessor can jump directly to them the next time the condition...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/pull/468
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e2bc8625-0019-e4c3-85d5-ab08ae356fa6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 91BE:FF1A8:1AC0D:23719:6A50570E |
| html-safe-nonce | 36cb59f70967a177e06b4ed2b2278b195b295a237e0e977096d78335258548ae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUJFOkZGMUE4OjFBQzBEOjIzNzE5OjZBNTA1NzBFIiwidmlzaXRvcl9pZCI6IjUwMTkwMzE5ODg1NTc4NjI2NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 56e8ccf0049f74ace10c2b1f836299b5dee393cf5205ff02d470d15639d0b800 |
| hovercard-subject-tag | pull_request:2645887618 |
| 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/simplecpp/pull/468/files |
| twitter:image | https://avatars.githubusercontent.com/u/10298420?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10298420?s=400&v=4 |
| og:image:alt | Adds caching for elif, else, and endif tokens that follow if, elif, and else the first time they're processed, so that the preprocessor can jump directly to them the next time the conditional b... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 33434464 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/simplecpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33434464 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/simplecpp |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width