home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / arch / 10987 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  5.4 KB

  1. Xref: sparky comp.arch:10987 comp.lang.misc:3827
  2. Newsgroups: comp.arch,comp.lang.misc
  3. Path: sparky!uunet!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!hrubin
  4. From: hrubin@mentor.cc.purdue.edu (Herman Rubin)
  5. Subject: Re: Hardware Support for Numeric Algorithms
  6. Message-ID: <By2MH8.JFB@mentor.cc.purdue.edu>
  7. Organization: Purdue University Statistics Department
  8. References: <722061187@sheol.UUCP> <1efh6vINNm6c@network.ucsd.edu> <722228704@sheol.UUCP>
  9. Date: Sat, 21 Nov 1992 14:48:43 GMT
  10. Lines: 95
  11.  
  12. In article <722228704@sheol.UUCP> throopw@sheol.UUCP (Wayne Throop) writes:
  13. >: From: mbk@lyapunov.ucsd.edu (Matt Kennel)
  14. >: Message-ID: <1efh6vINNm6c@network.ucsd.edu>
  15. >: The point, is, he [..Herman Rubin..]
  16. >: wants a high-level real language, with real optimizers,
  17. >: that nonetheless, does not consider hardware dependence to be anathema.
  18.  
  19. >Except that when such capabilities are pointed out, he sneers at
  20. >them, and then asks for something else.  For example, gcc can generate
  21. >inline procedures with assembly instructions interspersed.  For pointing
  22. >this out, people get sneered at, and told that the notation isn't
  23. >simple enough.
  24.  
  25. Working in a university environment does produce some problems, which
  26. those with reasonable manpower support do not seem to realize.  I can
  27. get gcc on some machines, but we do not yet have it on the one I am
  28. supposed to use for production.  Also, it cannot be used for program
  29. design for more than one machine, which is something I am supposed to
  30. be involved in.  This is a major reason for asking for a good macro
  31. translator, to isolate the dependent problems from the independent 
  32. ones and still be able to communicate.  I cannot reasonably communicate
  33. SPARCstation program to someone using an RS/6000 or a CRAY Y-MP, but I
  34. can communicate the algorithm to a mathematician using any one of those
  35. machines in such a way that a language hacker could come up with good
  36. code in consultation.
  37.  
  38. >When solutions to notation problems are presented, such as introducing
  39. >operators into gcc by the usual lex and yacc notations, or by
  40. >preprocessing with the TXL system mentioned by Matt a bit later, people
  41. >get sneered at, and told that specifying syntax in these ways is
  42. >too difficult.
  43.  
  44. As far as I can tell, TXL is a very new product.  I will not be able to
  45. access it until our systems people decide it is safe enough to use.
  46.  
  47. I am not just interested in producing good code for one machine, but
  48. good code in general, and I believe that this can be done without 
  49. requiring every mathematician or physicist wanting good procedures 
  50. for non-uniform random numbers to learn Lisp.
  51.  
  52. >So as near as I can see, solutions to the problems Herman Rubin
  53. >complains about are out there, and available for use now.  Herman Rubin
  54. >simply refuses to use them until they are customized for his needs to
  55. >an uneconomical extent.
  56.  
  57. For an individual machine, they have always been there.  Programming in
  58. obfuscated assembler languages can do anything.
  59.  
  60. >The bottom line: Herman Rubin is attributing to malice and stupidity 
  61. >what is adequately explained by simple economics.
  62.  
  63. I have generally charged inadvertence rather than malice.  However, I do
  64. charge anyone who leaves out something "because it can be misused" with
  65. malice.  I do charge anyone who says that "these tools are adequate to do
  66. a good quick job" with malice if it is not the case.
  67.  
  68. The situation is similar to what has happened to our educational system;
  69. we have set up procedures so that more harm than good has been done.  In
  70. education, teaching rote without understanding destroys minds and makes
  71. it difficult to acquire the understanding later; in hardware and software,
  72. restricting the possibilities makes subsequent flexibility much harder.
  73.  
  74. >: So if C doesn't know how to do a fp divide with integer quotient and a
  75. >: remainder in one instruction, or how to do a "add in parallel, but
  76. >: only on those processors in this mask" (a CM),
  77. >: then no amount of higher-level rewriting will help.
  78.  
  79. >Yes, this is the most central problem, which Jim Giles mentioned also.
  80. >Some method is needed which will specify the generated code, and yet
  81. >will fit in with the optimizations and register allocations and so on
  82. >which are already in place.  Jim says this "isn't too difficult", but 
  83. >I think it is the single most difficult part.  I've seen several
  84. >solutions, each with some advantages over the others.
  85.  
  86. THIS is one aspect of the problem; the attempt to get a detailed complete
  87. package, instead of putting partial solutions together; the attempt to
  88. take the programmer out of an interactive optimization procedure with the
  89. compiler; the failure to realize that the present so-called optimizations
  90. and register allocations are often bad; etc.
  91.  
  92. >But ultimately, when you are going after that last 1% or .1% of speed,
  93. >you will simply have to spell out the istream, operation by operation.
  94. >No amounts of hints to the optimizer will ever be enough, because
  95. >ultimately the optimizer can only deal with hints it is prepared to
  96. >accept, and if a programmer comes up with something unforseen by the
  97. >optimizer, there's no simple way to give a hint about it.
  98.  
  99. So put in simple ways to give hints, instead of saying that no hints
  100. can be given.  The difference is not the last 1% of speed, but often
  101. 50% of the running time or more.
  102. -- 
  103. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  104. Phone: (317)494-6054
  105. hrubin@snap.stat.purdue.edu (Internet, bitnet)  
  106. {purdue,pur-ee}!snap.stat!hrubin(UUCP)
  107.