whileloop
Re:Which is faster? while(1) {} or while(2) {}
on Tuesday July 22, 2014 @08:20AM (#8068522)
This question was asked to me in a major MNC by a senior manager, after 4 technical round.
He started off by asking how do I manage conflict in team and went on to say "for example, if you write while (2) { // some code } and someone in code review suggests that replace this with while (1) or vice-versa, then how do you handle the conflict and how do convince him". I said both are same speed. he interuppted and said "check your basics, while (1) is faster " and moved on to next set of questions.
He was not testing my confidence. He actually bilived that while 1 is faster.