boxo icon indicating copy to clipboard operation
boxo copied to clipboard

blocks: change Block to a value struct

Open Jorropo opened this issue 2 years ago • 1 comments

The goal is to stop doing two allocations for each block (now it will only allocate the []byte buffer, and pass the cid.Cid, []byte pair by decomposed registers or stack).

This way of changing does not change the syntax for trivial uses of block.Block, so in theory we will have to update only producers of block.Block, not consumers.

Fixes ipfs/go-block-format#45

Jorropo avatar Mar 03 '23 07:03 Jorropo

This is failing to build in Kubo due to https://github.com/ipfs/go-ipld-format/blob/0f7aff00f72e9dea0d9718bc0972e309ba7c3e8d/format.go#L27

Jorropo avatar Mar 03 '23 07:03 Jorropo

Replaced by https://github.com/ipfs/go-block-format/pull/53

gammazero avatar Aug 06 '24 17:08 gammazero