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