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