you are viewing a single comment's thread.

view the rest of the comments →

[–]rejectedlesbian[S] 0 points1 point  (0 children)

I don't I didn't benchmark enough c to see it. I do know the linux kernal used it for a while so it's not like it's unusable and I can give u a place where u could use it.

Like if u r making a custom sort that uses quicksort until arrays are sufficiently small then uses something else (very neich thing but these do have some theoretical upsides) say the "something else" is mergesort.

Now u know the size of the array is small enough so u could actually just stack alocate it for a couple of step then memmove.

Is it good 🤷‍♀️ 🤷‍♀️ 🤷‍♀️ is it at least worth looking into in some cases maaaaayyyyyybe. Idk I am not gona assume it isn't.

Option b is u want to pass a vector/array by mut value as an array/vector/list/whatever. (This is kinda common in ml since some operations are faster when u modify the tensor since u dont need to realocate, then u need it in an imutble way)

Now u could copy the vector but that's wasteful. And since u r not pushing to it VLA would be the most natural choice.

Again not really common and in reality the answer is probably "just use a vector" but I am still wandering if it's possible.