Fastest way to convert VariantVector to Vector<T>?

In my projects, I do a ton of work with VariantVectors and Variants in general. Something that comes up a lot is that I have say, a typed Vector:

Vector<Vector3> myPoints;

and I want to convert this to a VariantVector. The obvious way is:

VariantVector myVarVec;
int numPoints = myPoints.Size();

for(int i = 0; i < numPoints; i++){
myVarVec[i] = myPoints[i];

Is there a mem_copy I can do? A cast?

(Some offtopic) Use




for speed.

The only way is that one.
You may perform per-element cast from Variant to Vector3, but I am unsure that it would be faster.