Search This Blog

Saturday, April 24, 2010

nested function call faster or not ?

Programmer Question

I have this silly argument with a friend and need a authoritative word on it.



I have these two snippet and want to know which one is faster ? [A or B]



(assuming that compiler does not optimize anything)



[A]



if ( foo () ); 


[B]



int t = foo ();
if ( t )


Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails