Skip to content

SmallCid internals for collection types #3498

@aatifsyed

Description

@aatifsyed

CidHashMap was changed from this:

struct CidHashMap<V> {
    small: HashMap<[u8;32], V>,
    big: HashMap<Cid, V>
}

to this:

struct CidHashMap<V>(HashMap<SmallCid, V>)

in #3388

That's wrong - we still care about saving overhead per-cid.

we need to restructure those changes, which looks like this I think:

  • SmallCid stays, for use in FrozenCid. It's the right tradeoff here
  • Have a public CompactCid, which is the implementation detail for SmallCid , for use in collection types

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions