home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18406 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!news
  3. From: scs@adam.mit.edu (Steve Summit)
  4. Subject: Re: quick addition using char and shorts....
  5. Message-ID: <1992Dec15.164618.22718@athena.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: adam.mit.edu
  8. Organization: none, at the moment
  9. References: <1992Dec10.154834.8349@news2.cis.umn.edu> <1992Dec14.045712.5938@athena.mit.edu> <1992Dec14.182803.28809@thinkage.on.ca>
  10. Date: Tue, 15 Dec 1992 16:46:18 GMT
  11. Lines: 19
  12.  
  13. In article <1992Dec14.182803.28809@thinkage.on.ca>, dat@thinkage.on.ca (David Adrien Tanguay) writes:
  14. > scs@adam.mit.edu (Steve Summit) writes:
  15. >> Certainly, though, this is an example of a classic space/time
  16. >> tradeoff: ...if you care more about space,
  17. >> prepare to sacrifice some time spent doing conversions.
  18. > But be careful: the space saved by using the smaller size may be exceeded
  19. > by the space required by the extra instructions needed to do the conversions!
  20.  
  21. David is absolutely right.  This observation underscores a more
  22. general point: if you care enough about optimizations to be
  23. spending time implementing them, make sure you perform at least a
  24. few measurements to verify their effect!  It would be tragic, if
  25. it weren't so pathetically funny, how often well-intentioned but
  26. misguided optimization efforts actually make things worse,
  27. without that fact ever being realized.
  28.  
  29.                     Steve Summit
  30.                     scs@adam.mit.edu
  31.