home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18360 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.6 KB

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