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

  1. Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!ai-lab!tropicana!kenneths
  2. From: kenneths@tropicana.ai.mit.edu (Kenneth J. Schneider)
  3. Newsgroups: comp.lang.c
  4. Subject: if and case alternative
  5. Date: 19 Dec 1992 16:44:55 GMT
  6. Organization: MIT Artificial Intelligence Lab
  7. Lines: 8
  8. Sender: kenneths@tropicana (Kenneth J. Schneider)
  9. Distribution: world
  10. Message-ID: <1gvji7INNu7@life.ai.mit.edu>
  11. NNTP-Posting-Host: tropicana.ai.mit.edu
  12.  
  13. on the previous if/case thread...
  14.  
  15. one not-so-readable way to avoid the slowness of a *large* list of if/else's or
  16. cases would be to make an array of pointers to the functions. this would, i
  17. believe, quite a bit slower for a small number of cases, but would be much better
  18. (for speed) for a large number of cases. 
  19.  
  20. comments?
  21.