Skip to content

api: revisit GetCell allocations #232

@Wondertan

Description

@Wondertan

The GetCell method returns the cell via allocation of a new slice and copying desired cell into it. Presumably, this is done for encapsulation reasons. However, the GetCell is used in hot paths putting pressure on GC(TODO profiles showing that). So we have a trade-off between foolproof API(prohibiting users from altering the internal slice in rsmt2d) and performance. The proposal is to either:

  • Add the new GetCellUnsafe method
    • Still breaks the perfect encapsulation leaking the internal slice for overwrites
  • Change the GetCell method to return the subslice stored on the EDS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions