Reinterpret to non bits type

Right - just reinterpret can’t know that though! It could have just as well been a single vector with two elements.

I don’t think you can do that in general without knowing more about things_to_sort, without falling back to something like workspace = Any[]. At least not in a safe way. Reusing a buffer typically requires knowing what you want to store in that buffer and allocating the workspace accordingly.

Yes, that’s be a little more involved, since julia does not allow you to do that without unsafe_*.