Creates a duplicate of a range for temporary use within a function in the
best wsy that can be done safely. If ElementType!(T) is a value type
or T is an array, the results can safely be placed in TempAlloc because
either it doesn't need to be scanned by the GC or there's guaranteed to be
another reference to the contents somewhere. Otherwise, the results
are placed on the GC heap.
This function is much faster if T has a length, but works even if it doesn't.
Creates a duplicate of a range for temporary use within a function in the best wsy that can be done safely. If ElementType!(T) is a value type or T is an array, the results can safely be placed in TempAlloc because either it doesn't need to be scanned by the GC or there's guaranteed to be another reference to the contents somewhere. Otherwise, the results are placed on the GC heap.
This function is much faster if T has a length, but works even if it doesn't.