home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19567 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.1 KB

  1. Xref: sparky comp.lang.c:19567 comp.lang.c++:18986
  2. Path: sparky!uunet!usc!howland.reston.ans.net!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!ac690
  3. From: ac690@cleveland.Freenet.Edu (Edward Klimas)
  4. Newsgroups: comp.lang.c,comp.lang.c++
  5. Subject: Re: C/C++ Speed
  6. Date: 12 Jan 1993 06:22:30 GMT
  7. Organization: Case Western Reserve University, Cleveland, OH (USA)
  8. Lines: 40
  9. Message-ID: <1ito36INNht3@usenet.INS.CWRU.Edu>
  10. References: <1ipsk5INNf5m@aludra.usc.edu>
  11. Reply-To: ac690@cleveland.Freenet.Edu (Edward Klimas)
  12. NNTP-Posting-Host: slc4.ins.cwru.edu
  13.  
  14.  
  15. In a previous article, dliao@aludra.usc.edu (David Liao) says:
  16.  
  17. >    Two programmers are writing the same program but with different
  18. >languages which are C and C++.  These two programmers are experts in 
  19. >their own programming language.  Hmm... which program will run faster
  20. >than the other?
  21. >
  22. >    I've heard that the execution speed of C++ tends to be slower
  23. >than C.  I know that C++ can make the life of programmer easier, but
  24. >I just want to know if the C program will run faster than the C++ program.
  25.     The programing environment with the largest reusable library
  26.     will usually end up being the fastest!  A little surprising
  27.     until one considers that there is about a 6:1 variation in performance
  28.     of programs when one has multiple developers create the same
  29.     end functionality.  If you have reusably libraries, they
  30.     are probably already partially optimized for performance already.
  31.     This phenomena seems to account for why large systems written
  32.     in low level languages run the same or slower than the same systems
  33.     written in higher level languages even though on a tight loop
  34.     the lower level language is much faster.
  35.  
  36. >
  37. >    I also heard the size of C++ program is generally bigger than C.
  38.     And C is larger than assembly code!  Don't get caught in this
  39.     potential misconception, although spagetti code will always
  40.     take more memory, using OO supports fine grain reuse much better
  41.     which in turn results in smaller programs
  42.  
  43. >I am a C programmer trying to learn C++.  So, don't blame me if I have 
  44. >created any misconception about C++.
  45. >
  46. >
  47. >David Liao
  48. >dliao@aludra.usc.edu
  49. >University of Southern California
  50. >    
  51. >
  52. >
  53. >
  54.