C... Why not c++?

M

Merrill & Michele

This demonstrate how c++ is faster then C.

On my PC C++ run 18 times more fast then C.

Look at:

http://www.research.att.com/~bs/new_learning.pdf

Try yourself the respective C and C++ code sample at pages 4 and 5.
Create a big file with a list of number to elaborate and sort and add
a logging for the time (one at the start and one at the end of main in
both files).

compile these two source files and see yourself at logs.

C++ is faster!!!
The free-fall to hell is markedly quicker than the ascent to heaven. What
point is trying to win a race where Mr. Gates shifts the finish line
according to whim? MPJ
 
T

Trent Buck

Quoth Merrill & Michele on or about 2004-11-25:
The free-fall to hell is markedly quicker than the ascent to heaven. What
point is trying to win a race where Mr. Gates shifts the finish line
according to whim? MPJ

Congratulations, that almost made sense.

-trent
 
M

Merrill & Michele

"Trent Buck"
Quoth Merrill & Michele on or about
[OP: ]C++ is faster!!!
The free-fall to hell is markedly quicker than the ascent to heaven. What
point is trying to win a race where Mr. Gates shifts the finish line
according to whim? MPJ

Congratulations, that almost made sense.

If that only "almost" makes sense you've got one type of problem. If you
think I'm in the mood for any more ad hominem, you err in a different way.
MPJ
 
J

Johnathan Doe

If that only "almost" makes sense you've got one type of problem. If you
think I'm in the mood for any more ad hominem, you err in a different way.
MPJ

Congratulations. That was sarcasm, not ad-hominem. You err.
 
C

Chris Croughton

This demonstrate how c++ is faster then C.

On my PC C++ run 18 times more fast then C.

Look at:

http://www.research.att.com/~bs/new_learning.pdf

Try yourself the respective C and C++ code sample at pages 4 and 5.
Create a big file with a list of number to elaborate and sort and add
a logging for the time (one at the start and one at the end of main in
both files).

compile these two source files and see yourself at logs.

C++ is faster!!!

Well, it sometimes has more efficient libraries (and as BS points out,
some of them are intrinsically more efficient because they know the
types of the items they are handling, like sort versus qsort). On the
other hand, some of the C++ libraries are less efficient in other ways
(particularly memory usage, some implementations of strings are horribly
wasteful of both memory and time because they copy rather than using
reference counting).

Compiling, however, is much slower for C++ than for C (on my machine,
using the same compiler on the same code the ratio is typically 2:1;
with equivalent but idiomatic C++ code (for instance those two BS
examples) it is more) and uses a lot more memory. And the executable
files for idiomatic C++ code are always bigger (for C code compiled as
C++ -- where that is valid -- they are about the same).

And of course one can depend on a C compiler being available on any real
operating system on a production machine, whereas C++ compilers are
still only on a minority of them (and those are ones used for
development)...

Chris C
 
M

Minti

Merrill said:
The free-fall to hell is markedly quicker than the ascent to heaven. What
point is trying to win a race where Mr. Gates shifts the finish line
according to whim? MPJ


Ahem... This is a neutral group. Please keep Billy and Linny out of here.
 
U

unknown_username

I confirm c++ is the fastest. My test confirm it's more powerful
particularly for data elaboration, probably for better algorhytm.
There are no rilevable difference between C and C++ during
hardware access.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,404
Latest member
PerryRutt

Latest Threads

Top