-
-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve runtime performance - lazy stringification, more inlining, no statics on the hot path, move semantics for classes such as doctest::String which are used by value, etc. #69
Comments
… don't fail - stringifying the expressions only if needed - relates #69 - also reduced a bit the size of the header with around 2kb... :D
…tic local - fixed the unary false asserts - they got broken in the previous commit... - relates #69
…translating exceptions - but that should be the exceptional path) - relates #69
The only thing left to optimize for the release of 1.2 is... the String class :)
- will add the final info on the runtime improvements in issue #69 but from what it seems this was a huge optimization :D - 0 allocations for the hot path when asserts dont fail.
…time performance boost for an assert that doesn't fail (evaluated 10 million times inside of a loop) - relates #69
The following code: TEST_CASE("") {
for(int i = 0; i < 10000000; ++i)
CHECK(i == i);
} used to run for 9.0 seconds built with MinGW-w64 g++ 7.1 in Release. Now it runs for 0.27 seconds. There were 3 changes that I introduced:
So this all amounts to a x33 faster runtime execution of asserts! There are >> 0 << allocations while looping the assert. All asserts benefit from these optimizations including the binary ones and the fast ones (they are the fastest not only for compile times but also for runtime) - they might not be 33 times faster but will still be a lot faster than before. Results are similar with other compilers - will update the benchmark part of the documentation soon. |
… don't fail - stringifying the expressions only if needed - relates #69 - also reduced a bit the size of the header with around 2kb... :D
…tic local - fixed the unary false asserts - they got broken in the previous commit... - relates #69
…translating exceptions - but that should be the exceptional path) - relates #69
The only thing left to optimize for the release of 1.2 is... the String class :)
…time performance boost for an assert that doesn't fail (evaluated 10 million times inside of a loop) - relates #69
No description provided.
The text was updated successfully, but these errors were encountered: