Re-use the argument?
- From: Tomás Ó hÉilidhe <toe@xxxxxxxxxxx>
- Date: Fri, 6 Jun 2008 23:48:49 -0700 (PDT)
Which of these functions would you go with?
unsigned Func(unsigned const x)
{
return 3*x - 2;
}
or:
unsigned Func(unsigned x)
{
x *= 3;
x -= 2;
return x;
}
.
- Follow-Ups:
- Re: Re-use the argument?
- From: rio
- Re: Re-use the argument?
- From: thomas . mertes
- Re: Re-use the argument?
- From: Stephen Sprunk
- Re: Re-use the argument?
- From: Malcolm McLean
- Re: Re-use the argument?
- From: CBFalconer
- Re: Re-use the argument?
- From: Richard Heathfield
- Re: Re-use the argument?
- Prev by Date: Re: Invalid results from exp2 function (C math library)
- Next by Date: A CT&P excursion - beat it up!
- Previous by thread: 100 Tools For Blogging
- Next by thread: Re: Re-use the argument?
- Index(es):