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
The current code allocates from the heap after already allocating from the stack a suitably sized array. This is inefficient but also unnecessary. Allocating Vecs in library code, as a general principal, should be avoided if at all possible, and, if absolutely necessary, it would be nice to be able to capture failed allocation. It's a long standing source of problems in long-running processes.
The text was updated successfully, but these errors were encountered:
I thinking about this when merge ports method. But as said I want keep dependence small as possible. Use crate for only single function it's too expensive
Expensive? I don't think you mean that. Admittedly, ArrayVec doesn't yet have a 1.0 release. If you're reluctant to add this, then could you let me pass in a [MaybeUninit; 7] then and pass back the used length?
The current code allocates from the heap after already allocating from the stack a suitably sized array. This is inefficient but also unnecessary. Allocating Vecs in library code, as a general principal, should be avoided if at all possible, and, if absolutely necessary, it would be nice to be able to capture failed allocation. It's a long standing source of problems in long-running processes.
The text was updated successfully, but these errors were encountered: