home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.arch:10873 comp.lang.misc:3762
- Path: sparky!uunet!kithrup!stanford.edu!agate!biosci!uwm.edu!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!psinntp!psinntp!dg-rtp!sheol!throopw
- From: throopw@sheol.UUCP (Wayne Throop)
- Newsgroups: comp.arch,comp.lang.misc
- Subject: clean notation or speed: choose one
- Message-ID: <722061181@sheol.UUCP>
- Date: 18 Nov 92 01:44:06 GMT
- References: <TMB.92Nov13144057@arolla.idiap.ch> <1992Nov13.155126.3660@linus.mitre.org> <1992Nov13.200222.23955@sal.wisc.edu> <BxpnrA.Eqp@mentor.cc.purdue.edu>
- Lines: 47
-
- : From: hrubin@mentor.cc.purdue.edu (Herman Rubin)
- : Message-ID: <BxpnrA.Eqp@mentor.cc.purdue.edu>
- : This is already clumsy, and difficult for a mathematician to read. And it
- : fails to use mathematical syntax; in use, simple syntax is more important
- : than obscure semantics. We prefer to write
- : x = y - z rather than sub3(x, y, z)
-
- That's all very well, but when you start to want to say
-
- h = (o^2 + a^2)^.5
-
- or even just
-
- x = y - c*z
-
- then issues arise of register allocation, instruction scheduling, type
- compabibility and/or conversions, peephole optimizations like
- substituting a square root routine for the ^.5 operation,
- and so on and on.
-
- NOW tell me... is "simple syntax" or "obscure semantics" more important
- to you? The two are simply not compatible. Ultimately, you MUST tell
- the computer exactly what instructions to generate if you want to
- squeeze the last gasp of performance. And you simply *can't* hide
- behind any simple notation when you do it, because that notation
- *doesn't* *contain* *enough* *information* about what machine
- operations you wish to generate.
-
- On the other hand, I've seen assemblers that do use
-
- x = y - z
-
- instead of
-
- sub3 x y z
-
- And sure enough allowing infix operators and symbolic descriptions
- of what each instruction does is a trivial thing to provide if you
- want it. But there's no escaping spelling out each instruction,
- each register use, each "committed slot" allocation *by hand* if
- you really want to squeeze the last drop of performance.
-
- Herman's mixing of the goals of istream control and abstract notational
- convenience means that he can never be satisfied with *any* solution to
- his problem, because the problem has self-contradictory goals.
- --
- Wayne Throop ...!mcnc!dg-rtp!sheol!throopw
-