Our great sponsors
ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations
In principle you're trying to convert between columnar and row-based data layouts, something that happens fairly often in data science. I bet there's some hyper-efficient SIMD magic that could be invoked for these slicing operations (and maybe the iterator solution does exactly that). Might be worth taking a look at how the relevant Rust libraries like ndarray do it.
I have published the source code and a more detailed writeup on Github.
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
How does explicit unrolling differ from iterating through elements one-by-one? (ndarray example)
1 project | reddit.com/r/rust | 13 Jan 2023
Help slicing 2D array in no_std environment
1 project | reddit.com/r/learnrust | 9 Jun 2022
ndarray: Apply along axis
2 projects | reddit.com/r/rust | 6 Mar 2021
Enzyme: Towards state-of-the-art AutoDiff in Rust
3 projects | reddit.com/r/rust | 12 Dec 2021
Pure rust implementation for deep learning models
3 projects | reddit.com/r/rust | 9 Oct 2022