You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
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...
i agree i will start a research and design for this,
i've felt it in my usecase too so i will begin the work.
@k5602 What you gonna use for SIMD operations abstraction?
i'm still in researching and trial and error phase but for now what i got
i design SimdKey with lanes that should match target's natural width and
implemented by types that support batch equality comparison.
and for the backing will be between
core::simd is the right thing as longterm option
raw core::arch is the answer for now where SIMD, and the scalar impl as the always-available floor, Verbose but can get handled
I don't know - I have working implementation with abstraction over wide and abstraction over Contiguous container (so it can be SmallVec, Vec, ArrayVec, etc). Which is actually rather a SortedLinearMap...
I need it to work only for desktop and mobile...
I just thought it could be useful in heapless...
I don't know - I have working implementation with abstraction over wide and abstraction over Contiguous container (so it can be SmallVec, Vec, ArrayVec, etc). Which is actually rather a SortedLinearMap... I need it to work only for desktop and mobile... I just thought it could be useful in heapless...
good thought but ig the whole idea of this that it can be used in embedded devices, i see core::arch is the solution for now so it can be mobile across all platforms.
Activity
k5602 commentedon Apr 21, 2026
i agree i will start a research and design for this,
i've felt it in my usecase too so i will begin the work.
tower120 commentedon Apr 21, 2026
@k5602 What you gonna use for SIMD operations abstraction?
k5602 commentedon Apr 21, 2026
i'm still in researching and trial and error phase but for now what i got
i design SimdKey with lanes that should match target's natural width and
implemented by types that support batch equality comparison.
and for the backing will be between
what do you think?
tower120 commentedon Apr 23, 2026
I don't know - I have working implementation with abstraction over
wideand abstraction over Contiguous container (so it can be SmallVec, Vec, ArrayVec, etc). Which is actually rather a SortedLinearMap...I need it to work only for desktop and mobile...
I just thought it could be useful in
heapless...k5602 commentedon Apr 25, 2026
good thought but ig the whole idea of this that it can be used in embedded devices, i see core::arch is the solution for now so it can be mobile across all platforms.