NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance comparison between for and foreach

Hi,
 
Here is another question on the performance. Assuming I have an array of string Locals.Test. Is it faster to use:
 
1) for (Locals.i = 0; Locals.i < GetNumArray(Locals.Test); Locals.i++)
...
end
 
or
 
2) foreach (Locals.CurrentTest in Locals.Test)
...
end
 
Regards,
Alexandre
0 Kudos
Message 1 of 3
(3,222 Views)

Hi,

So what have you noticed?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,207 Views)

Hi,

This is the same as for my previous post http://forums.ni.com/ni/board/message?board.id=330&message.id=19289).

Thanks,

Alexandre

0 Kudos
Message 3 of 3
(3,190 Views)