optimization - In C, which is faster: if with returns, or else if with returns? -


Is it better if / else if, if if statement gives each block or is it better is the chain of ICs? To be specific, which is the fastest:

A:

  if (condition1) {code1; Return; } If (condition2) {code2; Return b; } // etc ...  

b:

  if (condition1) {code1; Return; } And if (condition2) {code2; Return b; } // etc ...  

It does not matter, and this is an unnecessary Attempt on micro-optimization.


Comments

Popular posts from this blog

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -