boostorg / boostorg/container

New container: chunked_vector

Open
#274 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
127
Forks
126
Avg merge
18h 53m
Merged PRs (30d)
1

Description

For Boost.Histogram, I need a new type of container. I plan to implement a private version to keep histogram decoupled from Boost.Container, but I wanted to propose this type of container for Boost.Container.

The container should store chunks of homogenous types with fixed length, which is defined at runtime, not compile time.

The container is internally implemented like std::vector, memory is contiguous. The element of the container is not a single value, but a chunk of values with fixed size, which is defined at runtime when the container is created. The value type of the container should be static_vector or small_vector, while its reference types should based on boost::span.

Basically, this is a much more efficient version of `std::vector>` for the case when you know that the inner vector will always have same length, but you don't know this length at compile-time, so you cannot use `std::vector>`.

I tentatively call this `chunked_vector`, but I hope you come up with a better name.

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.