-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
The portable SIMD project implements an as_simd() function for slices. The basics are that you get 3 slices and the middle one is a SIMD slice. It allows for fast aligned loads of the data, which could matter if your algorithm is becoming memory bound; it is also a convenient and safe abstraction. In my case, I actually have 2 vectors (say, x and y). I can take them apart using as_simd() like so:
Some initial thoughts: - Using #[repr(C, align(N))] on a new type around Vec doesn't seem to work because it will not impact the allocation of the internal growable buffer. - Monkeying around with the initial allocation may work, though I am unfamiliar as yet with the allocator API or using the global allocator to specify layouts. From reading online, it seemed like when you copy or grow your vector you may lose your work. - There are a few crates that offer aligned vectors like aligned-vec and maligned. Going back and forth between these the std::simd API might add some complexity, and I am also concerned about potential unsoundness in external crates (both of these authors are far beyond me, so this is not meant to be a criticism of them).