gnu3dkit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu3dkit-dev] Ann: GeometryKit 0.7.5


From: Philippe C . D . Robert
Subject: Re: [Gnu3dkit-dev] Ann: GeometryKit 0.7.5
Date: Tue, 15 Oct 2002 08:09:38 +0200

On Tuesday, October 15, 2002, at 04:39  Uhr, Brent Gulanowski wrote:
Another thing, but this is more a question than anything else. Regarding:

  tuple[0] /= aScalar;
  tuple[1] /= aScalar;
  tuple[2] /= aScalar;

Does the compiler automatically optimize this to:

float temp = 1/aScalar;
tuple[0] *= aScalar;
tuple[1]*= aScalar;
tuple[2]*= aScalar;

or am I behind the times in thinking that division is a lot slower than multiplication (meaning that my "optimization" is really a waste of effort)?

I don't know if gcc does it, you can verify it easily though (use -s when compiling). Anyway, I often use this tmp/mulu approach elsewhere. So if you send me a diff or point me to the place where I forgot to do so, I can change it in CVS (or do it yourself, you should have access).

Thanks,

-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip





reply via email to

[Prev in Thread] Current Thread [Next in Thread]