Skip to content

Allocation strategies for vector creation #388

@Shimuuar

Description

@Shimuuar

Currently we have following size hints in bundle:

data Size = Exact Int          -- ^ Exact size
          | Max   Int          -- ^ Upper bound on the size
          | Unknown            -- ^ Unknown size

however buffer allocation for vector has only two strategies: doubling for unknown and exact allocation for both Exact and Max. I think we should have three: unbounded doubling, doubling with bound for Max, and preallocation for Exact

P.S. It was also proposed to add lower bound to discussion

Metadata

Metadata

Assignees

No one assigned

    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