From b67053fedb3b760e88a851303c193adbce97f232 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 24 Jul 2022 12:06:21 -0700 Subject: [PATCH] Add optimistic assertions section. --- BUILD.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/BUILD.md b/BUILD.md index 2f08f36..7ed548f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -139,9 +139,17 @@ statements when `--enable-debug` is not used. ``` --with-assert=trap ``` -Recommended when using `--enable-assert` for debugging. This replaces the -default mechanism of assertion with traps rather than aborts; allowing -developers to explore an unterminated program. +Recommended when using `--enable-assert` for functional-testing and debugging. +This replaces the default mechanism of assertion with traps rather than aborts; +allowing developers to explore an unterminated program. + +``` +--with-assert=opt +``` +Optimistic assertions are branchless and generate less code than other modes. +Assertion failure is only detected at the end of each core event loop iteration. +These assertions are intended to minimally reveal the existence of a failure and +are much harder to debug. #### Manually enable optimization