home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7324 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.8 KB  |  69 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!dtint!usenet
  3. From: nevin@dtint.dtint.com
  4. Subject: Re: Coding Rules (NOT rtf)
  5. Message-ID: <1992Nov20.070607.28526@dtint.uucp>
  6. Sender: usenet@dtint.uucp
  7. Reply-To: nevin@dtint.dtint.com
  8. Organization: Digital Technology, International
  9. References: <1992Nov20.065829.28459@dtint.uucp>
  10. Date: Fri, 20 Nov 92 07:06:07 GMT
  11. Lines: 56
  12.  
  13. In article <1992Nov20.065829.28459@dtint.uucp> nevin@dtint.dtint.com writes:
  14. > In article <BxzEsF.60C.2@cs.cmu.edu> ddj+@cs.cmu.edu (Doug DeJulio) writes:
  15. > > In article <1992Nov19.000858.26075@dtint.uucp> nevin@dtint.dtint.com  
  16. writes:
  17. > > >> 3.0 which might tend to reverse NeXT's original position (most of the  
  18. 3.0
  19. > > >> slow-down is related to nib/disk/memory stuff).
  20. > > >
  21. > > > I've heard a slightly different story about the 3.0 slowdown, from an
  22. > > > ex-NeXT employee.  It was caused (according to him) by a
  23. > > > generalization of things like "malloc(512)" to
  24. > > > "malloc(sizeof(somesuch) * 4)" in order to better support new
  25. > > > platforms (ala 486).
  26. > > 
  27. > > That sort of construct is evaluated at compile-time, not at
  28. > > execute-time.  So it would explain a slow-down in compiles, but not in
  29. > > general performance.
  30. > > -- 
  31. > > Doug DeJulio
  32. > > ddj+@cmu.edu
  33. > You're right about that particular construct.  But never-the-less, one of the  
  34. > obvious features of "malloc()" is the ability to compute desired block size  
  35. via  
  36. > an arithmetic expression at run-time.  And, it's quite reasonable to choose  
  37. an  
  38. > appropriate arithmetic expression such that the arithmetic expression's  
  39. syntax  
  40. > is constant, and yet it's value changes at run-time depending on the  
  41. hardware,  
  42. > due to architectural differences.  I just threw out a lousy example--from the  
  43. > hip.
  44. > I realize that many such problems could probably be handled via compile-time  
  45. > switches and #defines, but I believe it is reasonable to conclude that some  
  46. > would fall into the aforementioned category and be computed at run-time.   
  47. > Hence, I believe what I was told by the ex-NeXT employee.
  48. > --
  49. > Nevin Pratt, Digital Technology, Int'l    Orem, Ut
  50. > NeXTmail preferred, but ONLY at my REAL email address: nevin@dtint.dtint.com
  51.  
  52. Besides, we don't need to get bogged down in "malloc()" details.  There are  
  53. plenty of other ways that slow-downs due to code generalizations to accommodate  
  54. architectural differences can occur.  I shot from the hip with the "malloc()"  
  55. thing in an attempt to illustrate at least one.
  56.  
  57. --
  58. Nevin Pratt, Digital Technology, Int'l    Orem, Ut
  59. NeXTmail preferred, but ONLY at my REAL email address: nevin@dtint.dtint.com
  60.  
  61. -- 
  62. ---
  63. root                                   root@dtint.dtint.com
  64. Digital Technology Int.                (801)226-2984    
  65. 500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
  66.