home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10609 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  5.2 KB

  1. Xref: sparky comp.arch:10609 comp.lang.misc:3585
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!news.unomaha.edu!news.mtholyoke.edu!nic.umass.edu!m2c!jjmhome!smds!rh
  3. From: rh@smds.com (Richard Harter)
  4. Newsgroups: comp.arch,comp.lang.misc
  5. Subject: Re: Hardware Support for Numeric Algorithms
  6. Message-ID: <1992Nov11.100555.4706@smds.com>
  7. Date: 11 Nov 92 10:05:55 GMT
  8. References: <BwJ4uz.1rA@rice.edu> <1992Oct23.004313.29196@ntuix.ntu.ac.sg> <1992Oct29.153514.22927@yrloc.ipsa.reuter.COM> <1992Nov5.202412.7266@linus.mitre.org> <1992Nov10.153705.27804@yrloc.ipsa.reuter.COM>
  9. Reply-To: rh@ishmael.UUCP (Richard Harter)
  10. Organization: Software Maintenance & Development Systems, Inc.
  11. Lines: 95
  12.  
  13. In article <1992Nov10.153705.27804@yrloc.ipsa.reuter.COM> rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) writes:
  14. >In article <1992Nov5.202412.7266@linus.mitre.org> bs@gauss.mitre.org (Robert D. Silverman) writes:
  15. >>In article <1992Oct29.153514.22927@yrloc.ipsa.reuter.COM> rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) writes:
  16.  
  17. >>:I write programs for correctness and maintainability first, THEN worry
  18. >>:about little details such as performance. If you create something that's
  19.  
  20. >>You've probably never done any large scale computing.
  21.  
  22. >>I measure the run time of my algorithms in MIPS-YEARS.  A MIPS-YEAR
  23. >>is a 1 MIPS machine running for 1 year, or approximately 3.1 x 10^13
  24. >>instructions.  Jobs that take several hundred MIPS-YEARS are not uncommon.
  25.  
  26. >Bad guess, unless Crays, 3090s (Yes, I know they barely count) and
  27. >a bit of CM-2 don't count.
  28.  
  29. He's not guessing; he's telling you.  Robert D. Silverman is a well known
  30. mathematician and number theorist.  Facorization of large numbers requires
  31. large amounts of computer time; quite often they are run on multiple
  32. machines.  He's speaking from his own personal knowledge.
  33.  
  34. >Perhaps your code REALLY is MIPS-years in complexity. OR, it could
  35. >be that failure to design properly leads to that complexity, whereas
  36. >careful thought could reduce it to months or less.
  37.  
  38. This suggests that you are fundamentally confused; an algorithm may be
  39. very simple and yet will require enormous amounts of computer time.
  40. Conversely it may be very complex and require only a small amount of
  41. computer time.
  42.  
  43. >Since I don't understand your problem, I can only speculate. 
  44.  
  45. What is the value of uninformed and irrelevant speculation?
  46.  
  47. >However, I DO know
  48. >that algorithmic excellence is the way to get speed, NOT dinking
  49. >around with what you perceive to be a bottleneck at the bit-diddling
  50. >level. AFTER you have the algorithm right, THEN you start tweaking
  51. >bits. Optimization before design is usually a bad idea. 
  52.  
  53. Did you ever tire of teaching your grandmother to suck eggs?  Bob
  54. is one the most knowledgable people in the world about factorization
  55. algorithms and the associated issues of multiple precision arithmetic,
  56. this bit of pontification is misplaced.  [Not that it isn't a sound
  57. principle -- you should realize that other people may already be aware
  58. of it.]
  59.  
  60. >>Needless to say, there are people who have to worry about speed FIRST,
  61. >>and that other considerations are (almost) irrelevent.
  62.  
  63. >Are you saying that speed is more important than correct answers? 
  64. >{I don't think so, but I though I had better ask.}
  65.  
  66. Yes, the answers have to be correct.  But he's right; there are people
  67. who have to worry about speed first and foremost.  Some problems are
  68. real cycle burners.
  69.  
  70.  
  71. >>I wish you people would stop insulting Herman simply because his requirements
  72. >>leads to code that is different from your petty and self-righteous 
  73. >>pre-conceived notions about coding style.
  74.  
  75.     I think Bob is off base here.  I understand well enough what
  76.     Herman is doing.  It's non-trivial.  But the problem is not
  77.     in Herman's coding style; I get the strong impression that
  78.     his skills as a programmer are not up the requirements of
  79.     his problem.
  80.  
  81. >I am not insulting him because of his requirements. (Maybe you have me
  82. >confused with another netter. Then again, perhaps you don't...)
  83. >I am still trying to understand his problem. Once I understand it,
  84. >THEN I can address his coding style. We prefer the use of the term
  85. >"opinionated" when using the first person form of "self-righteous".
  86.  
  87. >>Not everyone writes commercial code, or code for customers. Maybe it's
  88. >>a research project that will end in a year. Stop being so provincial.
  89.  
  90. >I can't help it. I live in the province of Ontario.   8^}
  91.  
  92. >The issue of code for customers or commerce is not the issue. It's an
  93. >issue of understanding. If you every have walked away from some code,
  94. >and come back to it 3 months later, with NO idea of what it does, or
  95. >how it could ever have possibly worked, perhaps you'll understand what
  96. >I'm trying to get at here.
  97.  
  98. This is a platitude.  What Bob is telling you is that there are problems
  99. which are so computationally demanding that computational efficiency is
  100. far more important than standard programming style guides.  It's all a
  101. matter of trade-offs.  There is a price for programming for clean code;
  102. in most cases the benefits far outweigh the price; sometimes they don't.
  103. -- 
  104. Richard Harter: SMDS Inc.  Net address: rh@smds.com Phone: 508-369-7398 
  105. US Mail: SMDS Inc., PO Box 555, Concord MA 01742.    Fax: 508-369-8272
  106. In the fields of Hell where the grass grows high
  107. Are the graves of dreams allowed to die.
  108.