Programming Model
Compartilhar

Zero-Copy Deserialization

📖O que é

A technique for accessing on-chain account data directly from the underlying byte buffer without copying it into a new Rust struct, avoiding heap allocation and reducing compute unit usage. In Anchor, zero-copy is enabled via #[account(zero_copy)] on the account struct, which uses repr(C) layout and the AccountLoader type. Ideal for large accounts (>1KB) where Borsh deserialization would be expensive.

Sua exploração

0 termos visitados no total
Termos relacionados explorados0/3

Termos Relacionados