I think you missed the point of my post. I agree that swap and pop/erase unsorted is the most efficient way to erase, but that’s not my question. My issue is with the find. I don’t want to have to find in the array twice which is what has to happen right now in my example, as far as I can tell.
STL uses the address of the iterator to find the offset into the vector memory to know where to delete. This makes it very fast. TArray doesn’t use iterators so it has either Remove, which takes the element, or RemoveAt, which takes the index. RemoveAt does roughly the same as what I described for vector erase, but Remove does a find in order to get the index so that it can use it to erase. I want to eliminate that find.