Re: Looping variables - Integer vs Long



rkc <rkc@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
news:2PW8f.28389$Bv6.10110@xxxxxxxxxxxxxxxxxxxx:

> David W. Fenton wrote:
>
>> I'd think that the For/Each loop would be faster because it
>> doesn't have to do an additional lookup on the index, but maybe
>> that's not correct.
>
> You're batting 1000 in the right department.
>
> For Each is ridiculously faster than For Next.
>
> 17,000 member collection.
>
> For Each: 3.955875
>
> For Next: 34.49275

That actually surprises me that it would be such a great difference.

Where did you get a 17K-member collection to work on? !!!!

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
.