Skip to main content

Module int_ops

Module int_ops 

Source
Expand description

Optimized integer arithmetic operations for hot paths

Provides fast-path implementations for common arithmetic operations that are used frequently in validation code. The fast path uses pre-validation to avoid checked arithmetic overhead when values are known to be safe.

Functionsยง

safe_add
Fast-path addition with overflow checking
safe_sub
Fast-path subtraction with overflow checking