Jump to text
On this page
Copy and source
Published source confirmed at last check

Source changed 2026-11-18 22:51:26 UTC · snapshot created 2026-11-18 22:54:45 UTC · last check 2026-11-18 23:55:20 UTC

CMP.10:8 - Common Anti-Patterns and How to Avoid Them

Tempting moveFailureUseful repair
Choose the smallest encodingDecoding or updates dominate the computation.Compare the required operations including conversion.
Treat all integers as constant-cost valuesOperand lengths grow beyond the cost model.Count bit operations or bound the admitted magnitudes.
Update only the changed leafDependent aggregates or indexes retain obsolete answers.Restore every affected invariant.
Reorder associative aggregatesAssociativity alone does not permit exchanging operands.Preserve order or establish commutativity for this operation.
Use one value for absence and a meaningful zeroThe reader cannot reconstruct the discarded distinction.Represent presence separately.