0

Possible Duplicates:
What loop is faster, while or for
For Loop or While Loop - Efficiency

Hello,

A very basic question struck my mind. Which of the for and while loops is faster? And why is one faster than another? Is it dependent on the programming language?

Thanks.

Community
  • 1
  • 1
Dharmit
  • 4,958
  • 2
  • 22
  • 28
  • 2
    asked many times before, and closed many times before. It's largely irrelevant – Mitch Wheat Feb 12 '11 at 05:49
  • Okay. Shall search for it. But when I typed the question title, it didn't appear in the list. Hence asked it. – Dharmit Feb 12 '11 at 05:50
  • @Senthil - Currently I am learning Python. But I am not sure if my question applies for all programming languages in general or does the performance change with languages. – Dharmit Feb 12 '11 at 05:51
  • @ Ignacio Vazquez-Abrams Thanks for pointing that out. – Dharmit Feb 12 '11 at 05:52

0 Answers0