diff options
author | onqtam <vik.kirilov@gmail.com> | 2018-12-05 17:23:56 +0200 |
---|---|---|
committer | onqtam <vik.kirilov@gmail.com> | 2018-12-05 17:35:23 +0200 |
commit | 24e4879bd0a932b1a724f54356894929e95f931c (patch) | |
tree | 1dd84f2aa9bc0b58c7d5998853e28c008e39ed06 | |
parent | 819f72aa48d3b2d7f63dd7aff635e01b410da25c (diff) |
updated docs
-rw-r--r-- | doc/markdown/assertions.md | 6 | ||||
-rw-r--r-- | doc/markdown/benchmarks.md | 12 | ||||
-rw-r--r-- | doc/markdown/faq.md | 2 | ||||
-rw-r--r-- | doc/markdown/features.md | 2 | ||||
-rw-r--r-- | scripts/data/benchmarks/asserts.png | bin | 86915 -> 87578 bytes |
5 files changed, 11 insertions, 11 deletions
diff --git a/doc/markdown/assertions.md b/doc/markdown/assertions.md index 555611d..8814668 100644 --- a/doc/markdown/assertions.md +++ b/doc/markdown/assertions.md @@ -44,7 +44,7 @@ Example: REQUIRE_FALSE(thisReturnsFalse()); ``` -- Using the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) config option can make compilation of asserts up to [**XX-XX%**](benchmarks.md#cost-of-an-assertion-macro) faster! +- Using the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) config option can make compilation of asserts up to [**31-63%**](benchmarks.md#cost-of-an-assertion-macro) faster! - These asserts also have a ```_MESSAGE``` form - like ```CHECK_MESSAGE(expression, message)``` which is basically a code block ```{}``` with a scoped [**```INFO()```**](logging.md#info) logging macro together with the ```CHECK``` macro - that way the message will be relevant only to that assert. The binary/unary asserts don't have this variation yet. Examples: @@ -63,7 +63,7 @@ For more information about the ```INFO()``` macro and logging with the streaming These asserts don't use templates to decompose the comparison expressions for the left and right parts. -These have the same guarantees as the expression decomposing ones but [**XX%-XX% faster**](benchmarks.md#cost-of-an-assertion-macro) for compilation. +These have the same guarantees as the expression decomposing ones but [**57-68% faster**](benchmarks.md#cost-of-an-assertion-macro) for compilation. ```<LEVEL>``` is one of 3 possible: ```REQUIRE```/```CHECK```/```WARN```. @@ -76,7 +76,7 @@ These have the same guarantees as the expression decomposing ones but [**XX%-XX% - ```<LEVEL>_UNARY(expr)``` - same as ```<LEVEL>(expr)``` - ```<LEVEL>_UNARY_FALSE(expr)``` - same as ```<LEVEL>_FALSE(expr)``` -Using the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) config option can make compilation of asserts up to [**XX-XX%**](benchmarks.md#cost-of-an-assertion-macro) faster! +Using the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) config option can make the binary asserts to compile up to [**84-91%**](benchmarks.md#cost-of-an-assertion-macro) faster! ## Exceptions diff --git a/doc/markdown/benchmarks.md b/doc/markdown/benchmarks.md index 1d09128..dd192d8 100644 --- a/doc/markdown/benchmarks.md +++ b/doc/markdown/benchmarks.md @@ -139,15 +139,15 @@ And here is [**Catch**](https://github.com/philsquared/Catch) which only has nor **doctest**: - is between 0 and 8 times faster than [**Catch**](https://github.com/philsquared/Catch) when using normal expression decomposing ```CHECK(a==b)``` asserts -- asserts of the form ```CHECK_EQ(a,b)``` with no expression decomposition - around 31%-63% faster than ```CHECK(a==b)``` -- the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) identifier which makes the fast assertions even faster by another 55-78% -- TODO: mention the super fast mode with normal asserts vs the fast compile option of catch -- using the [**```DOCTEST_CONFIG_DISABLE```**](configuration.md#doctest_config_disable) identifier the assertions just disappear as if they were never written - even lower than the baseline (because most of the implementation is also gone) +- asserts of the form ```CHECK_EQ(a,b)``` with no expression decomposition - around 31-63% faster than ```CHECK(a==b)``` +- the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) identifier makes the normal asserts faster by 57-68% +- the [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) identifier makes the binary asserts even faster by another 84-91% +- using the [**```DOCTEST_CONFIG_DISABLE```**](configuration.md#doctest_config_disable) identifier the asserts just disappear as if they were never written - even lower than the baseline (because most of the implementation is also gone) [**Catch**](https://github.com/philsquared/Catch): -- using [**```CATCH_CONFIG_FAST_COMPILE```**](https://github.com/philsquared/Catch/blob/master/docs/configuration.md#catch_config_fast_compile) results in 10%-30% faster build times for asserts (and in one case 73%). -- using the **```CATCH_CONFIG_DISABLE```** identifier provides the same great benefits for assertion macros as the doctest version ([**```DOCTEST_CONFIG_DISABLE```**](configuration.md#doctest_config_disable)) - unlike in the case for the header cost +- using [**```CATCH_CONFIG_FAST_COMPILE```**](https://github.com/philsquared/Catch/blob/master/docs/configuration.md#catch_config_fast_compile) results in 10-30% faster build times for asserts (and in one case 73%). +- using the **```CATCH_CONFIG_DISABLE```** identifier provides the same great benefits for assert macros as the doctest version ([**```DOCTEST_CONFIG_DISABLE```**](configuration.md#doctest_config_disable)) - but not for the header cost ## Runtime benchmarks diff --git a/doc/markdown/faq.md b/doc/markdown/faq.md index b4a9964..eafa2a0 100644 --- a/doc/markdown/faq.md +++ b/doc/markdown/faq.md @@ -59,7 +59,7 @@ using doctest::Approx; ### How to get the best compile-time performance with the framework? -The [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) config option yelds the [**fastest possible**](benchmarks.md#cost-of-an-assertion-macro) compile times (up to XX-XX%). Also the expression-decomposing template machinery can be skipped by using the [**binary**](assertions.md#binary-and-unary-asserts) asserts. +The [**```DOCTEST_CONFIG_SUPER_FAST_ASSERTS```**](configuration.md#doctest_config_super_fast_asserts) config option yelds the [**fastest possible**](benchmarks.md#cost-of-an-assertion-macro) compile times (up to 31-91%). Also the expression-decomposing template machinery can be skipped by using the [**binary**](assertions.md#binary-and-unary-asserts) asserts. There are only 2 tiny drawbacks of using this config option: diff --git a/doc/markdown/features.md b/doc/markdown/features.md index 02f2c94..049c44a 100644 --- a/doc/markdown/features.md +++ b/doc/markdown/features.md @@ -32,7 +32,7 @@ - all tests built and ran in **Debug**/**Release** modes - all tests ran through **valgrind** under **Linux** (sadly [not under OSX](https://github.com/onqtam/doctest/issues/11)) - all tests ran through **address**, **UB** and **thread** sanitizers under **Linux**/**OSX** - - tests are ran in more than **168** different configurations on UNIX (Linux + OSX) on **travis** CI + - tests are ran in more than **140** different configurations on UNIX (Linux + OSX) on **travis** CI - tests are ran in a total of **10** different configurations on Windows on **appveyor** CI ## Other features: diff --git a/scripts/data/benchmarks/asserts.png b/scripts/data/benchmarks/asserts.png Binary files differindex 71e8ec9..a19bb22 100644 --- a/scripts/data/benchmarks/asserts.png +++ b/scripts/data/benchmarks/asserts.png |