Mail Archives: djgpp/1997/05/13/13:49:35
I've read the Michael Abrash text.. and.. well..
I still think that integer math is faster... I had
few floting point programs which doubled their
speed once I converted them to integer math...
and I have a Pentium. and a 486. pentium is better
with floting point numbers than the 486, but nothing
beats clean integer math.
I mean... who would use floting numbers in a simple
line algorithm... everybody wants the "all integer, no shifting"
aproach...... why? wouldn't it be easier just to write
the thing with floting point number?
quark(particle)
quark AT webspan DOT net
http://www.webspan.net/~quark
C/C++/ASM/Java/JavaScript/HTML/Perl
A. Sinan Unur wrote in article <337865D0 DOT FB8 AT cornell DOT edu>...
>Robert Blum wrote:
>>
>> jon <quacci AT vera DOT com> wrote
>> > I'm interested in understanding what can be done to speed up straight
>> > C code. In the specific thing I am writing, I've already done the
>> > obvious things, like switched most calcs from FP to integer, using
bit
>> > shifting wherever possible for multiplying and dividing, etc.
>>
>> Duh.. That must have been from a very old source of information. On
>> the Pentium (I assume you use one), FP is even faster than integer
>> performance.
>
>actually, that has been so since the 486. michael abrash wrote about his
>experience in dr dobbs some time ago. anyway, the moreal of the story is
>"measure before you optimize".
>--
> Sinan
>
>*******************************************************************
> A. Sinan Unur WWWWWW
> |--O+O
> mailto:sinan DOT unur AT cornell DOT edu C ^
> http://www.people.cornell.edu/pages/asu1/ \ ~/
>
>Unsolicited e-mail is _not_ welcome, and will be billed for.
>*******************************************************************
>
- Raw text -