Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transforming an ARRAY
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Transforming an ARRAY
Miscellaneous
Thread ID:
00153394
Message ID:
00153394
Views:
52
Hello,

I have an array that is X by Y. For example, DIMENSION MyArray[X,Y].

The problem is, it's being returned from another program and I need it to be Y by X. This array can be very large. Let's say X = 5 and Y = 100,000. If I do:

Dimension MyNewArray[Y,X]
for I = 1 to X
for Z = 1 to Y
MyNewArray[Z,I] = MyArray[I,Z]
endfor
endfor

the results take too long. My current routine runs in 26 seconds. With the array transform, the routine takes up to 54 seconds. Way to much of a performance hit.

So, what I'm looking for is a faster way than the above.

Thanks, Scott
Next
Reply
Map
View

Click here to load this message in the networking platform