#vec #allocation #box #slice #alignment

aligned-vec

Aligned vector and box containers

8 releases (4 breaking)

Uses new Rust 2021

0.5.0 Aug 21, 2022
0.4.2 Jul 29, 2022
0.3.2 Jul 25, 2022
0.2.0 Jul 24, 2022
0.1.0 Jul 24, 2022

#888 in Data structures

Download history 8/week @ 2022-08-09 22/week @ 2022-08-16 82/week @ 2022-08-23 16/week @ 2022-08-30 377/week @ 2022-09-06 536/week @ 2022-09-13 460/week @ 2022-09-20 185/week @ 2022-09-27 402/week @ 2022-10-04 172/week @ 2022-10-11 309/week @ 2022-10-18 195/week @ 2022-10-25 355/week @ 2022-11-01 310/week @ 2022-11-08 249/week @ 2022-11-15 487/week @ 2022-11-22

1,414 downloads per month
Used in 13 crates (4 directly)

MIT license

40KB
1K 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

~64KB