comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: fixed point vs floating point
Date: 1997/11/27
Date: 1997-11-27T00:00:00+00:00	[thread overview]
Message-ID: <dewar.880661467@merv> (raw)
In-Reply-To: 65kgu4$289@lotho.delphi.com


tmoran says

<<  So the current crop of systems has fast fpt, slow integer */, and
slow memory.  A few years ago that was not the case.  Things like
MMX instructions start to move back toward fast integer arithmetic.
What's fast this year is not the same as what's fast next year.
As Mathew Heaney pointed out earlier, it would be wise to design
data types, etc, to match the problem, and then, if speed is
an issue, change things to optimize for the particular current target.
>>

That's true only if you think a few means 5-10 years. This pattern
is fairly old by now, you have to go back a long way (really to the
early 80's to find fast memory -- i.e. main memory comparably fast
to the processors). When I bought my first PC1 in 1981, the memory
was 250ns, and the processor was 4.77MHz (= approx 210 ns), a reasonable
match (remember the visibility of "wait states" in those days?) Now a
decent PC has a 266MHz processor (60 times faster clock, and of course
really the factor is higher), yet memory is only 5-6 times faster.

By all means one should choose floating-point or fixed-point in reponse
to the problem these days. But remember in this thread that a number of
people were in the mindset that one of the possible reasons for choosing
fixed-point was greater speed, and it seems that quite a few people were
unaware that with modern processors this reason, to the extent it is
valid at all, points in the other direction (of course specialized
processors, e.g. those with no fpt, may point in the opposite direction).

However, it is not simply a matter of optimization to flip between
fixed- and floating-point formats, they have radically different
semantics, and you choose the one that matches your semantic requirement.
Matthew's point that because the definition of angle nicely fits the
fixed-point declaration, that is what should be used, is fundamentally
flawed. The decision on whether to represent an angle as fixed-point
or floating-point depends on the operations to be performed on the
quantity and not much else!

By the way, Tom, you keep mentioning MMX (one might almost think you were
an Intel salesperson), but I see MMX has having zero impact on general
purpose computing and general purpose compilation. It is intended for
very specialized hand-written code, and it seems very unlikely that it
is good for anything else.

(I partly base this estimate on the experience with the i860. Remember that
these kinds of instructions are not new, they were on the i860 7 years ago,
but in practice were not useful for general purpose computing).





  reply	other threads:[~1997-11-27  0:00 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-27  0:00 fixed point vs floating point tmoran
1997-11-27  0:00 ` Robert Dewar [this message]
1997-11-29  0:00   ` Tarjei T. Jensen
  -- strict thread matches above, loose matches on Subject: below --
2011-09-29 10:25 RasikaSrinivasan@gmail.com
2011-09-29 10:49 ` AdaMagica
2011-09-29 13:38   ` Martin
2011-09-30 10:17 ` Stephen Leake
2011-09-30 16:25   ` tmoran
2011-09-30 16:52     ` Dmitry A. Kazakov
2011-10-01 11:09     ` Stephen Leake
2011-09-30 19:26   ` tmoran
2011-09-30 22:31   ` tmoran
2011-10-01 13:37   ` RasikaSrinivasan@gmail.com
2011-10-02 14:19     ` Stephen Leake
1997-12-02  0:00 Robert Dewar
1997-12-02  0:00 ` Joe Gwinn
1997-12-02  0:00   ` Ken Garlington
1997-12-03  0:00     ` Joe Gwinn
1997-12-04  0:00       ` Robert Dewar
1997-12-04  0:00         ` Shmuel (Seymour J.) Metz
1997-12-02  0:00   ` Robert Dewar
1997-12-02  0:00     ` Matthew Heaney
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00     ` Shmuel (Seymour J.) Metz
1997-12-03  0:00       ` Matthew Heaney
1997-12-04  0:00         ` Shmuel (Seymour J.) Metz
1997-12-04  0:00           ` Robert Dewar
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00     ` robin
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00 ` robin
1997-11-28  0:00 tmoran
1997-11-28  0:00 ` Robert Dewar
1997-11-22  0:00 Matthew Heaney
1997-11-22  0:00 ` Tucker Taft
1997-11-22  0:00   ` Robert Dewar
1997-11-22  0:00     ` Matthew Heaney
1997-11-23  0:00 ` Geert Bosch
1997-11-23  0:00   ` Matthew Heaney
1997-11-23  0:00     ` Robert Dewar
1997-11-24  0:00       ` Herman Rubin
1997-11-24  0:00         ` Robert Dewar
1997-11-25  0:00           ` Joe Gwinn
1997-11-25  0:00             ` Robert Dewar
1997-11-25  0:00               ` Joe Gwinn
1997-11-25  0:00                 ` Robert Dewar
1997-11-26  0:00                   ` Joe Gwinn
1997-11-26  0:00                     ` Robert Dewar
1997-12-01  0:00                       ` Joe Gwinn
1997-12-01  0:00                         ` Robert Dewar
1997-12-01  0:00                           ` Joe Gwinn
1997-12-03  0:00                           ` robin
1997-11-25  0:00             ` Matthew Heaney
1997-11-26  0:00             ` William A Whitaker
1997-11-24  0:00     ` Geert Bosch
1997-11-23  0:00   ` Tom Moran
1997-11-25  0:00     ` John A. Limpert
1997-11-25  0:00       ` Robert Dewar
1997-11-25  0:00       ` Robert Dewar
1997-11-24  0:00 ` Vince Del Vecchio
1997-11-24  0:00 ` Vince Del Vecchio
1997-12-03  0:00 ` robin
     [not found] <9711221603.AA03295@nile.gnat.com>
1997-11-22  0:00 ` Ken Garlington
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox