Int array test for all values zero

  • Thread starter Thread starter mm
  • Start date Start date
maciek said:
So I still insist that in _practice_ for-loop is 5% faster than foreach for
the example considered in current thread.

I would like to talk about particular example.

Yes, for this specific case a for loop would be faster than foreach, but
that is kind of a moot point, as no loop at all is even faster.
 
Göran Andersson said:
Now you don't make any sense. Did Arne say that the code doesn't have to
work, as long as it's fast?

I wrote:

#I would be relative sure that there efficiency of this operation
#does not matter for a real world program.
#
#Make your own for loop or use an implicit loop like in Array.Exists,
#but don't waste too much time on the problem.

Arne
 
Back
Top