Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[C] Which is faster?

Name: Anonymous 2010-07-13 5:57


if(a > 3)
{
  int expected_b = fun(a);
  if(good_enough(b, expected_b))
  {
    do_stuff();
  }
}


VS


int expected_b = fun(a);
if(a > 3 && good_enough(b, expected_b))
{
  do_stuff();
}


This is done a shitload of times. fun(a) is a simple linear function.

Name: Anonymous 2010-07-14 3:33

I WOULD LIKE TO HEAR FV'S OPINION ON THIS.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List