#alignment #box #vec #allocation #slice

no-std aligned-vec

Aligned vector and box containers

9 releases (5 breaking)

0.6.0 May 21, 2024
0.5.0 Aug 21, 2022
0.4.2 Jul 29, 2022
0.3.2 Jul 25, 2022
0.1.0 Jul 24, 2022

#273 in Parser implementations

Download history 1553/week @ 2024-02-08 1646/week @ 2024-02-15 1840/week @ 2024-02-22 1803/week @ 2024-02-29 6952/week @ 2024-03-07 23327/week @ 2024-03-14 38550/week @ 2024-03-21 37469/week @ 2024-03-28 37788/week @ 2024-04-04 39082/week @ 2024-04-11 38686/week @ 2024-04-18 45802/week @ 2024-04-25 52588/week @ 2024-05-02 50742/week @ 2024-05-09 51712/week @ 2024-05-16 33866/week @ 2024-05-23

197,064 downloads per month
Used in 86 crates (22 directly)

MIT license

56KB
1.5K SLoC

aligned-vec

This crate provides the AVec<T> and ABox<T> types, which are intended to have a similar API to Vec<T> and Box<T>, but align the data they contain to a runtime alignment value.

This is useful for situations where the alignment of the data matters, such as when working with numerical data that can get performance benefits from being aligned to a SIMD-compatible memory address.

Features

  • std (default feature): Links this crate to the std-crate instead of the core-crate.
  • serde: Implements serialization and deserialization features for ABox and AVec.

lib.rs:

aligned-vec

This crate provides the AVec<T> and ABox<T> types, which are intended to have a similar API to Vec<T> and Box<T>, but align the data they contain to a runtime alignment value.

This is useful for situations where the alignment of the data matters, such as when working with numerical data that can get performance benefits from being aligned to a SIMD-compatible memory address.

Features

  • std (default feature): Links this crate to the std-crate instead of the core-crate.
  • serde: Implements serialization and deserialization features for ABox and AVec.

Dependencies

~0.3–0.9MB
~21K SLoC