home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19600 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.7 KB  |  38 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!daffy!skool.ssec.wisc.edu!tobis
  3. From: tobis@skool.ssec.wisc.edu (Michael Tobis)
  4. Subject: Re: Moving from Pascal to C, Help please!!!!!! 
  5. Message-ID: <1993Jan12.214820.29903@daffy.cs.wisc.edu>
  6. Sender: news@daffy.cs.wisc.edu (The News)
  7. Organization: U.Wis.-Madison; Atmospheric & Oceanic Sciences
  8. References: <4293@dozo.and.nl> <726510754snz@panache.demon.co.uk> <1993Jan12.190826.20740@mksol.dseg.ti.com>
  9. Date: Tue, 12 Jan 1993 21:48:20 GMT
  10. Lines: 26
  11.  
  12. In article <1993Jan12.190826.20740@mksol.dseg.ti.com>, mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
  13. |> In <726510754snz@panache.demon.co.uk> raph@panache.demon.co.uk (Raphael mankin) writes:
  14. |> 
  15. |> >IMHO the only thing one can say about pointer arithmetic is DON'T.
  16. |> 
  17. |> There's singularly bad advice from someone with that much experience.
  18. |> 
  19. |> >If your pointer points to an array, use subscripting. Let the compiler's
  20. |> >optimiser work out whether there are really better ways of doing the job.
  21.  
  22. My main project uses four dimensional arrays on a RISC processor
  23. (really RISC, INMOS Transputers to be specific). Explicitly using
  24. pointers ALMOST TRIPLES the execution speed of the code.
  25.  
  26. Do not take this silly advice about pointers if you are extensively using
  27. multidimensional arrays and you care about execution time.
  28.  
  29. (nor if you are interested in large data bases, either. I've seen code
  30. in FORTRAN try to build a tree heirarchy. blecchhh.)
  31.  
  32. If your project is small enough that not using pointers is appropriate,
  33. and you are hiring programmers who are uncomfortable with it, your
  34. project should probably be written in Pascal.
  35.  
  36. mt
  37.  
  38.