Sam Finch
Jun 9th, 2000, 10:08 PM
Hi, I'm doing some big exiting fractals, all of wich involve the use of the function.
complex newcomplex(double realpart, double imaginarypart)
{
complex retval;
retval.real=realpart;
retval.imaginary=imaginarypart;
return retval;
}
is there a way of declaring retval so that it is not assigned to memory and just stays in the registers as holding it in memory will slow it down (this function could be accessed literaly millions of times drawing a large fractal so speed is important)
i've tried
complex newcomplex(double realpart, double imaginarypart)
{
register complex retval;
retval.real=realpart;
retval.imaginary=imaginarypart;
return retval;
}
and it compiles but there's no real way of knowing if that's doing what I want, MSDN doesn't really say anything usefull.
thanks in adv
complex newcomplex(double realpart, double imaginarypart)
{
complex retval;
retval.real=realpart;
retval.imaginary=imaginarypart;
return retval;
}
is there a way of declaring retval so that it is not assigned to memory and just stays in the registers as holding it in memory will slow it down (this function could be accessed literaly millions of times drawing a large fractal so speed is important)
i've tried
complex newcomplex(double realpart, double imaginarypart)
{
register complex retval;
retval.real=realpart;
retval.imaginary=imaginarypart;
return retval;
}
and it compiles but there's no real way of knowing if that's doing what I want, MSDN doesn't really say anything usefull.
thanks in adv