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

  1. Xref: sparky comp.arch:11035 comp.lang.misc:3845
  2. Newsgroups: comp.arch,comp.lang.misc
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
  4. From: jlg@cochiti.lanl.gov (J. Giles)
  5. Subject: Re: Hardware Support for Numeric Algorithms
  6. Message-ID: <1992Nov23.183204.12281@newshost.lanl.gov>
  7. Sender: news@newshost.lanl.gov
  8. Organization: Los Alamos National Laboratory
  9. References: <722061187@sheol.UUCP> <1efh6vINNm6c@network.ucsd.edu> <722228704@sheol.UUCP>
  10. Date: Mon, 23 Nov 1992 18:32:04 GMT
  11. Lines: 37
  12.  
  13. In article <722228704@sheol.UUCP>, throopw@sheol.UUCP (Wayne Throop) writes:
  14. |> [...]
  15. |> But ultimately, when you are going after that last 1% or .1% of speed,
  16. |> you will simply have to spell out the istream, operation by operation.
  17.  
  18. Unfortunately, the speedup from going to assembly is usually in the 
  19. 5% to 10% area.  And yes, there are people to whom such an increase
  20. is worth a man-year or two of effor to achieve.  They'd rather spend
  21. less effort if the CS community would provide better integrated tools
  22. for optimizing, and there are people who cannot afford the effort
  23. these kinds of optimizations require - but would benefit also if the
  24. tools were improved.
  25.  
  26. |> [...]
  27. |> No amounts of hints to the optimizer will ever be enough, because
  28. |> ultimately the optimizer can only deal with hints it is prepared to
  29. |> accept, and if a programmer comes up with something unforseen by the
  30. |> optimizer, there's no simple way to give a hint about it.
  31.  
  32. True.  However it's possible to have the amount of explicit 
  33. assembly kept to a minimum if the proper interfacing protocols 
  34. are present.  For example, neither C nor Fortran (nor most other 
  35. high-level languages) have a way for the user to get the leading 
  36. zero count of the vector mask on a Cray.  I have algorithms which
  37. need that computation and which are time-critical.  The nearest 
  38. that the high-level languages can do is some clumsy loop.  All 
  39. I really need are some intrinsics corresponding to the instructions 
  40. which set the vector mask based on some array conditionals and an 
  41. intrinsic which does a leading zero count instruction.  In fact, 
  42. if  all the machine instructions were avalable as intrinsic functions
  43. calls, then the compiler need only be able to do  adequate register 
  44. allocation between these intrinsics (and also into the code generated 
  45. from the higher level) and I could optimize any part of the code 
  46. without paying procedure-call overhead.
  47.  
  48. -- 
  49. J. Giles
  50.