home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / arch / 8371 < prev    next >
Encoding:
Text File  |  1992-07-28  |  3.0 KB  |  68 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!psinntp!ficc!peter
  3. From: peter@ferranti.com (Peter da Silva)
  4. Subject: Re: CISC Microcode (was Re: RISC Mainframe)
  5. Message-ID: <id.RKUR.GFF@ferranti.com>
  6. Organization: Xenix Support, FICC
  7. References: <54638@mentor.cc.purdue.edu> <id.YGRR.V_5@ferranti.com> <55117@mentor.cc.purdue.edu>
  8. Date: Mon, 27 Jul 1992 12:41:44 GMT
  9. Lines: 57
  10.  
  11. In article <55117@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  12. > In article <id.YGRR.V_5@ferranti.com> peter@ferranti.com (Peter da Silva) writes:
  13. > >In article <54638@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  14. > >> >        1) The compilers can't figure out how to use them often.
  15.  
  16. > >> We keep hearing that compilers can do as well as humans.
  17.  
  18. > >They do, but not in the same way. Similarly there are optimisations compilers
  19. > >will use that humans can't.
  20.  
  21. > If an optimization involves extensive calculation, a superfast sub-imbecile
  22. > can do it better than a human.
  23.  
  24. I'm glad you noticed it. We're agreed then that these idiot savants generate
  25. code that is as fast as a human can write, if not the same sort of code. 
  26.  
  27. > >> >    or    2) Most realistic code doesn't lend itself to the mode.
  28.  
  29. > >> What is realistic code?  I will code differently if there is hardware
  30. > >> auto-increment for addresses.
  31.  
  32. > >I won't.
  33.  
  34. > Why not?  Because this would involve using an optimization not in the
  35. > usual set?
  36.  
  37. Because allowing the compiler to find machine-specific optimisations is more
  38. cost effective than doing it myself. Because the code I write runs on Sparcs,
  39. 68000s, 80386s, 80286s, VAXen, and 68020s. Because next month it might be
  40. running on MIPS or 88000. Next year it might be running on Supersparc or Alpha.
  41. Because optimising when you don't need to is a waste of resources.
  42.  
  43. If I'm writing a Forth inner interpreter loop in assembly, I'll use "JMP (IP)+"
  44. or "LDA IP; PLO PC; LDA IP; PHI PC; SEP PC" or "MOV [IP]++,PC". If I'm writing
  45. even a small complete program, I'll let the compiler worry about whether to use
  46. a multiply or a shift.
  47.  
  48. > >I expect any good programmer to code for the abstract machine defined for
  49. > >the language. Remember, software longa, hardware brevis.
  50.  
  51. > This might be reasonable if we had a language produced by people who have
  52. > some respect for the capabilities of humans.
  53.  
  54. We do. We have dozens of them.
  55.  
  56. > An analogy to the present
  57. > programming languages would be a car-controller in which one could feed
  58. > in a destination, but would not allow manual control.
  59.  
  60. Analogies are like instant coffee, but what you want is a little more primitive
  61. than that. I don't know about you, but I'm glad they don't make cars with
  62. manual chokes any more, or that need double-clutching when you shift.
  63. -- 
  64. Peter da Silva                                               `-_-'
  65. $ EDIT/TECO LOVE                                              'U` 
  66. %TECO-W-OLDJOKE Not war?                        Have you hugged your wolf today?
  67. Ferranti Intl. Ctls. Corp.      Sugar Land, TX  77487-5012       +1 713 274 5180
  68.