rust-embedded / rust-embedded/heapless
LinearMap with explicit SIMD support?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 253
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
I don't know how much this would fit into this crate, but LinearMap could significantly win from SIMD search.
I have implementation of similar container that store keys in wide::simd packs. It works on top of "the usual" Vec, but it would be
not so hard to port it to heapless::Vec.
Alternatively - it is possible to implement SIMD search on existent LinearMap for supported SIMD types... But as far as I
know - only desktop CPUs have zero-to-none penalty for loading from non-aligned memory to register. And looks like you
aim for embedded hardware... So you probably "have" to explicitly use SIMD types as key packs.
I understand that simd types is not stable in Rust, and wide crate supports only desktop hardware... But as a suggested solution for that: we could have simple custom SIMD types/traits which will initially points to wide implementation. Than they could be expanded by community on as-need basis...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LinearMap entry point and review how it stores and searches keys, then compare the proposed wide::simd-pack approach with heapless::Vec and embedded constraints. Define the supported SIMD types or traits, portability expectations, and a measurable search outcome before implementation; the issue does not currently specify tests or a completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100