Skip to content

TestNullPointer: avoid unnecessary Settings creations#8511

Merged
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:testnull
Apr 30, 2026
Merged

TestNullPointer: avoid unnecessary Settings creations#8511
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:testnull

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator Author

Some of these tests showed up in the slowest valgrind ones.

Clang 22 8,765,375,304 -> 562,138,632

before

Benchmark 1: bin/testrunner TestNullPointer
  Time (mean ± σ):     780.7 ms ±   2.7 ms    [User: 737.3 ms, System: 43.2 ms]
  Range (min … max):   776.6 ms … 785.8 ms    10 runs

after

Benchmark 1: bin/testrunner TestNullPointer
  Time (mean ± σ):     152.5 ms ±   0.9 ms    [User: 115.5 ms, System: 36.9 ms]
  Range (min … max):   151.1 ms … 154.9 ms    19 runs

Unfortunately I could not run it in valgrind as it is currently broken on my distro.

@firewave firewave changed the title TestNullPointer: avoid unnecessary Settings creation TestNullPointer: avoid unnecessary Settings creations Apr 29, 2026
@firewave firewave merged commit 9f57635 into cppcheck-opensource:main Apr 30, 2026
70 checks passed
@firewave firewave deleted the testnull branch April 30, 2026 07:29
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