comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin D. Condic" <mcondic-nospam@quadruscorp.com>
Subject: Re: Disallowing Pre-Defined Operations
Date: 2000/04/07
Date: 2000-04-07T14:57:44+00:00	[thread overview]
Message-ID: <38EE213D.4DCA8D3B@quadruscorp.com> (raw)
In-Reply-To: 8ckf7f$9nl$1@nnrp1.deja.com

Robert Dewar wrote:
> 
> In article <38ED3145.BE3CEC68@quadruscorp.com>,
>   "Marin D. Condic" <mcondic-nospam@quadruscorp.com> wrote:
> > If its too hard to implement or you just don't think it has
> > enough interest for ACT to support it
> 
> You missed my main point, which is that in the unlikely event
> that a compiler DOES want to support this efficiently, no
> change to the language is required, since Intrinsic can be
> used for this purpose.
> 
O.K. I seem to recall somewhere in the past where this issue came up
that you pointed out that the language had mechanisms for doing this. I
can accept that a solution does exist. My only point is that if a
compiler were to come fully equipped with this right out of the box that
it would be a useful feature to have. If it was just right there in
front of you and had an efficient implementation, it would likely get
put to all sorts of new and creative uses. (Keep in mind that there are
thousands of programmers out there to whom "saturated math" is a
complete unknown. We'll probably yet get someone out there posting
"What's saturated math?" - nobody can know everything, eh?)

Think of it this way: When Ada83 was out there, people bemoaned the fact
that there weren't any standard math libraries. The argument against it
was essentially identical to yours: Any competent programmer can go
build his own and it doesn't require a change to the language. Sooner or
later (for a variety of reasons, including efficiency of implementation)
the vendors each started providing their own non-standard math
libraries. Ada95 comes around and (color me astonished! :-) there's a
standard set of math libraries! Life is good and the world is a
wonderful place indeed.

So *if* a vendor were to put such a thing out there - sort of pioneering
an uncharted territory - even if any competent programmer could do it
within the confines of the existing syntax and semantics - it might end
up setting the standard for a future extention to Ada.

And its also an issue that the users of such features may understand how
to use them, but may not be nearly as smart about how to build them.
That's why we hire really smart guys to go write compilers instead of
having every programmer go roll his own.

> Indeed the only convincing input here from my point of view
> would be some user who programs it themselves, and actually
> measures that there is a performance problem.
> 
In hard real time systems where this particular feature is most likely
to be used, you sweat over microseconds. Using instruction X versus
instruction Y because X takes a couple of fewer clock ticks can be a big
deal. I've regularly bagged all the runtime checks, hand optimized
assembly code, reordered events, and pulled all kinds of dirty tricks to
get just a little more room in the cycle. You do it not because it is
good computer science or even particularly safe, but because if you
don't you might as well just pack up and go home because it isn't going
to run.

So if my compiler vendor is smarter than I am about how to get just a
little bit more performance out of some math routines, I want the
compiler to do it directly. Especially since math ops happen with such
frequency. Heck, if I could get the *hardware* to do the saturation, I'd
be ten times as happy! Unfortunately, its a lot harder to change the
silicon than it is to change the compiler.

> 
> I actually find that very few Ada programmers properly
> understand the intrinsic feature of Ada 95, or even know
> of its existence. Pity -- because this is really an important
> part of the language design.
> 
That's why we rely on features and tools provided by the vendors. We
can't all be Ada-Einsteins, can we? :-)

MDC
-- 
=============================================================
Marin David Condic   - Quadrus Corporation -   1.800.555.3393
1015-116 Atlantic Boulevard, Atlantic Beach, FL 32233
http://www.quadruscorp.com/
m c o n d i c @ q u a d r u s c o r p . c o m

***PLEASE REMOVE THE "-NOSPAM" PART OF MY RETURN ADDRESS***

Visit my web site at:  http://www.mcondic.com/

"I'd trade it all for just a little more"
    --  Charles Montgomery Burns, [4F10]
=============================================================




  reply	other threads:[~2000-04-07  0:00 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-10  0:00 Disallowing Pre-Defined Operations Charles H. Sampson
2000-03-09  0:00 ` Samuel T. Harris
2000-03-12  0:00   ` Steven Hovater
2000-03-09  0:00 ` Keith Thompson
2000-03-10  0:00 ` mark_biggar
2000-03-10  0:00 ` Jean-Pierre Rosen
2000-03-11  0:00   ` Tarjei Tj�stheim Jensen
2000-03-11  0:00     ` James S. Rogers
2000-03-13  0:00       ` Tarjei T. Jensen
2000-03-13  0:00     ` Robert Dewar
2000-03-13  0:00       ` Keith Thompson
2000-03-15  0:00         ` Robert Dewar
2000-03-13  0:00     ` dmitry6243
2000-03-15  0:00     ` Charles H. Sampson
2000-03-15  0:00       ` Robert Dewar
2000-03-21  0:00         ` Charles H. Sampson
2000-03-21  0:00           ` Robert Dewar
2000-03-21  0:00           ` Robert A Duff
2000-03-12  0:00   ` claveman
2000-03-12  0:00     ` Robert A Duff
2000-03-13  0:00       ` Tarjei T. Jensen
2000-03-13  0:00         ` Robert Dewar
2000-03-13  0:00         ` Robert A Duff
2000-03-15  0:00       ` Charles H. Sampson
2000-03-15  0:00         ` Tucker Taft
2000-03-15  0:00           ` Paul Graham
2000-03-16  0:00             ` Charles Hixson
2000-03-17  0:00               ` Paul Graham
2000-03-17  0:00                 ` Charles Hixson
2000-03-18  0:00                   ` Robert Dewar
2000-03-20  0:00                     ` Charles Hixson
2000-03-20  0:00                       ` Robert Dewar
2000-03-16  0:00             ` Robert Dewar
2000-03-16  0:00           ` Bryce Bardin
2000-03-16  0:00           ` Tarjei T. Jensen
2000-03-16  0:00             ` mark_biggar
2000-03-16  0:00             ` Dale Stanbrough
2000-03-17  0:00         ` Robert A Duff
2000-03-13  0:00     ` Ted Dennison
2000-03-14  0:00 ` Nick Roberts
2000-03-15  0:00   ` Robert Dewar
2000-03-17  0:00 ` William A Whitaker
2000-03-18  0:00   ` Robert Dewar
2000-03-22  0:00     ` William A Whitaker
2000-03-23  0:00       ` Robert Dewar
2000-04-06  0:00         ` Robert I. Eachus
2000-04-05  0:00           ` Marin D. Condic
2000-04-06  0:00             ` Robert Dewar
2000-04-06  0:00               ` Marin D. Condic
2000-04-07  0:00                 ` dale
2000-04-07  0:00                   ` Marin D. Condic
2000-04-07  0:00                     ` Tarjei T. Jensen
2000-04-07  0:00                       ` Marin D. Condic
2000-04-07  0:00                         ` tmoran
2000-04-07  0:00                           ` Marin D. Condic
2000-04-08  0:00                             ` Vladimir Olensky
2000-04-08  0:00                             ` Vladimir Olensky
2000-04-08  0:00                         ` Dale Stanbrough
2000-04-10  0:00                         ` Tarjei T. Jensen
2000-04-15  0:00                         ` Niklas Holsti
2000-04-15  0:00                           ` Marin D. Condic
2000-04-07  0:00                 ` Robert Dewar
2000-04-07  0:00                   ` Marin D. Condic [this message]
2000-04-09  0:00               ` Robert I. Eachus
2000-03-18  0:00   ` Robert Dewar
2000-03-18  0:00   ` Robert Dewar
replies disabled

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