haskell / haskell/vector

Allocation strategies for vector creation

Open
#388 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
400
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Currently we have following size hints in bundle:

```haskell
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](https://github.com/haskell/vector/issues/301#issuecomment-845587128)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.