home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!mimbres.cs.unm.edu!constellation!osuunx.ucc.okstate.edu!olesun!gcouger
- From: gcouger@olesun.okstate.edu (Gordon Couger)
- Newsgroups: comp.lang.c
- Subject: Re: a question about if and case
- Message-ID: <1992Dec15.005143.10180@osuunx.ucc.okstate.edu>
- Date: 15 Dec 92 00:51:43 GMT
- Article-I.D.: osuunx.1992Dec15.005143.10180
- References: <1gi6poINN3lv@nz12.rz.uni-karlsruhe.de> <Bz9H6p.DrB@netnews.jhuapl.edu>
- Sender: news@osuunx.ucc.okstate.edu (USENET News System)
- Organization: Oklahoma State University, Stillwater
- Lines: 28
- Nntp-Posting-Host: olesun.agen.okstate.edu
-
- In article <Bz9H6p.DrB@netnews.jhuapl.edu> bandy@netnews.jhuapl.edu (Mike Bandy) writes:
- >"hans friedrich steffani" <GM08@DKAUNI2.BITNET> writes:
- >
- >>int i;
- >
- >>if( i == 1 || i == 25 || i == 125 )
- >> {
- >>switch( i )
- >> {
- >> case 1:
- >> case 25:
- >> case 125:
- >> /* do something sophisticated */
- >> break;
- >IMHO people worry about this sort of thing too much. The important thing
- >is to develop a strong *maintainable* style. The performance differences
- >are insignificant, so do what you thing works best.
- If you are writing some bookkeeping program maybe but slow code accumulates.
- Try writing a graphics routine or somthing that is in a loop that runs for
- 4 days and slow code will show up.
- IMHO if you get in the habit of writing fast code and maintainable code you
- are better off.
- I realize I come from a different angle than most programmers. I work mostly
- with embeded systems. where speed is king.
-
- Gordon Couger
- AB5Dg Agriculture Engineering Oklahoma State University
- gcouger@olesun.agen.okstate.edu 405-744-6514 day 744-2794 evenings
-