Skip to main content

address_is_zero

Function address_is_zero 

Source
pub fn address_is_zero(a: &Address) -> bool
Expand description

Fast is-zero check: OR-fold the address’s 4 u64 words.

Cheaper than comparing against an all-zero constant because only one operand is loaded. Useful for system-program / default-address checks (the system program id is the all-zero address).