Programming Model
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 totalTermos relacionados explorados0/3
Termos Relacionados
Account DataProgramming Model
The byte array stored in an account that holds program-specific state. Data is typically s…
Ver termo →BorshProgramming Model
Binary Object Representation Serializer for Hashing—the standard serialization format for …
Ver termo →AccountLoader (Anchor)Programming Model
An Anchor account type that provides zero-copy access to large account data without deseri…
Ver termo →