Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generates erasure codes in-place using mutable references into shreds…
…' payload When making Merkle shreds from data, parity shards are first generated externally in a vector of vectors: https://github.com/anza-xyz/agave/blob/6ff4dee5f/ledger/src/shred/merkle.rs#L1325 and then copied into coding shreds payload: https://github.com/anza-xyz/agave/blob/6ff4dee5f/ledger/src/shred/merkle.rs#L1346 There are also many intermediate vector allocations in the process. The commit avoids this and minimizes allocations by first initializing all data and coding shreds in all erasure batches in a single vector. Then the erasure codes are generated and populated in-place using mutable references into the coding shreds' payload.
- Loading branch information