home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / arch / 9047 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  3.6 KB

  1. Path: sparky!uunet!pipex!unipalm!uknet!gdt!aber!aberfa!pcg
  2. From: pcg@aber.ac.uk (Piercarlo Grandi)
  3. Newsgroups: comp.arch
  4. Subject: Re: Natural Word Size (was Re: 32 => 64 Transition
  5. Message-ID: <PCG.92Aug26011022@aberdb.aber.ac.uk>
  6. Date: 26 Aug 92 01:10:22 GMT
  7. References: <1992Aug24.171440.2271@gateway.novell.com>
  8.     <1992Aug24.191322.14510@bcars64a.bnr.ca>
  9.     <DOCONNOR.92Aug24135056@potato.sedona.intel.com>
  10. Sender: news@aber.ac.uk (USENET news service)
  11. Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
  12. Organization: Prifysgol Cymru, Aberystwyth
  13. Lines: 68
  14. In-Reply-To: doconnor@sedona.intel.com's message of 24 Aug 92 21: 50:56 GMT
  15. Nntp-Posting-Host: aberdb
  16.  
  17. Nntp-Posting-Host: potato
  18.  
  19.  
  20. (Paul Taysom) writes:
  21.  
  22. Tayson> If at all possible, I want local variables stored in the natural
  23. Tayson> word size of the machine.
  24.              ^^^^^^^
  25.  
  26. (Stanley T.H. Chow) writes:
  27.  
  28. Chow> The question is: "What is the natural word size" of any given
  29. Chow> machine or architecture family. More importantly, as Joe Average
  30.       ^^^^^^^ ^^ ^^^^^^^^^^^^
  31. Chow> Programmer, when should I expect the natural size to change? [ ...
  32. Chow> ] Clearly, for an archtecture family, there is *no* natural word
  33. Chow> size. At best, there is a "prefered" size that is defined by the
  34. Chow> architecture that may or may not get "better optimization" in any
  35. Chow> implementation.
  36.  
  37. O'Connor writes:
  38.  
  39. O'Connor> This may be true for some CISC architectures, but it is
  40. O'Connor> decidedly untrue for many RISC architectures. The Intel
  41. O'Connor> i960(tm) architecture, for example, [ ... ] almost all
  42. O'Connor> register-to-register operations are done on 32-bit values.
  43. O'Connor> There are a few 32/64 bit operations. To my mind, this means
  44. O'Connor> all the i960 family members have a natural word size: 32 bit.
  45.  
  46. Sorry for this long series of quotes, but context is important...
  47.  
  48. While O'Connor says correctly that an *architecture* may have a fairly
  49. obvious natural word size, Chow's point, based on this comment by
  50. Tayson:
  51.  
  52. Tayson> [ ... non naturally sized writes to memory can lose because ... ]
  53. Tayson> The write is placed in the write buffer but because it is only a
  54. Tayson> partial write of a word, the write has to complete to memory
  55. Tayson> before the read can be allowed to proceed.  With deep write
  56. Tayson> buffers, this can take tens even hundreds of cycles (i've seen
  57. Tayson> one case where this took ~200 cycles).
  58.  
  59. Is that performance wise it is the implementation's natural size that
  60. matters. And we cannot disagree on this.
  61.  
  62. The reason for which this is true is that many/most implementations of
  63. an architecture are stricter than the architectures themselves, i.e.
  64. they are improperly (in a purely technical sense) designed.
  65.  
  66. Tayson's example amounts to saying that many implementations use caches
  67. entries as poor man's (1-deep, very wide) memory queues, which is easy,
  68. but can have horrid performance implications.
  69.  
  70. And this is not limited to CISC architectures, actually it is even more
  71. tied to RISC architectures, whose caching strategies are vital. Consider
  72. the the amazing variation (almost an order of magnitude!) in performance
  73. on RS/6000 machines at varying array strides, and at the similar if less
  74. pronounced effects of cache organization on many other RISC
  75. implementations.
  76.  
  77. *Iff* implementations were always done "appropriately" then the system's
  78. "natural" word size would coincide with that of the CPU's architecture.
  79. But because of cost effectiveness, or worse, reasons this is rarely
  80. true, and then it is the system's natural word size that matters.
  81. --
  82. Piercarlo Grandi                   | JNET: pcg@uk.ac.aber
  83. Dept of CS, University of Wales    | UUCP: ...!mcsun!ukc!aber-cs!pcg
  84. Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@aber.ac.uk
  85.