Skip to content
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

REQUIRE has very large compilation time overhead #668

Open
wichtounet opened this issue Jun 1, 2016 · 0 comments
Open

REQUIRE has very large compilation time overhead #668

wichtounet opened this issue Jun 1, 2016 · 0 comments

Comments

@wichtounet
Copy link

wichtounet commented Jun 1, 2016

Hi,

After investigating the compilation time of my test cases, I have found that a lot of time was simply used by Catch and especially the REQUIRE macro. There are several reasons for that, but the main reason is that the macros are generating a lot of code and that because of the expression left and right hand sides deduction, it is hard to simplify the macros.

By introducing REQUIRE_EQUALS macros in my code and simplifying it to the maximum, I have been able to reduce the total compilation time of my tests by 27%!

If you are interested, you can have a look at: http://baptiste-wicht.com/posts/2016/06/reduce-compilation-time-by-another-16-with-catch.html for more information.

REQUIRE_EQUALS and CHECK_EQUALS may be something you want to consider for users that care about the compilation time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants