Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

fastest c/c++ compilers

Name: Anonymous 2010-09-26 10:35

In your opinion, how would you compare the speed of the programs produced by the MSVC, GCC and ICC C/C++ compilers?

Name: Anonymous 2010-09-26 10:50

With time?

Name: Anonymous 2010-09-26 11:02

With time?
yes, if you were to take an identical program....a large program, say a 3D game, and run that same code in all three compilers, which would run faster? I know programmers have different criteria for what is fast for them and have different benchmarking techniques for measuring that speed, thats why I asked "in your opinion" in the first post, because no one can agree exactly on how to measure speed.

Name: Anonymous 2010-09-26 11:06

>>3
I don't think it would be that hard to measure speed.
From the time you hit the compile button to the time it finishes compiling.

Name: Anonymous 2010-09-26 11:16

>>4
I dont care about compilation time with C or C++. Just the runtime speed of the program it produces

Name: Anonymous 2010-09-26 11:32

Vroom vroom

Name: Anonymous 2010-09-26 11:40

ICC > MSVC > GCC

duh!

Name: Anonymous 2010-09-26 12:39

>>5
Make a program that takes a while to run, compile it various times and find out for yourself!

Name: Anonymous 2010-09-26 14:36

>>3
Write your "fast" code in ruby.
Compile the ruby interpreter with MSVC, GCC and ICC.
Compare.

Name: Anonymous 2010-09-26 14:38

Apparently execution speed is just a matter of opinion instead of a thing you can measure objectively now. Who knew?

Name: Anonymous 2010-09-26 15:41

I did a quick web search and found this webpage that does a fairly comprehensive set of benchmarking tests, and surprisingly the speed advantage of ICC over GCC is rather minuscule
http://www.coyotegulch.com/reviews/intel_comp/intel_gcc_bench2.html

Name: Anonymous 2010-09-26 15:53

>>11
That's only surprising to people who actually believe the FUD surrounding GCC.

Name: Anonymous 2010-09-26 16:54

>>11
17 December 2002
This article is obsolete


…

Name: Anonymous 2010-09-26 17:19

>>13
Just
like
SICP
!

Name: Anonymous 2010-09-26 17:23

>>1
There is no such thing as a ``C/C++'' compiler.

Name: Anonymous 2010-09-26 17:33

>>15
gcc
youve just been hurt feelings and butt ranged

go drink ur moms bredt milk u fart commander

i bet u hav a fetish FOR MEN LMAO

ur just so made all the timeits 2 easy 23 own u

"I lik to drnikj sperm from my sperm bottle wile wearing my sperm necklace" - u

Name: Anonymous 2010-09-26 19:24

>>15
there is no such thing as a C compiler. all C++ compilers have to include all of C for backward compatibility, so no one makes just a C compiler anymore

Name: Anonymous 2010-09-26 19:44

>>17
EXPERT TROLLING

Name: Anonymous 2010-09-26 19:45

>>17
There is no such thing as a C++ compiler, because no compiler fully implements the C++ standard.
There is no such thing as a C99 compiler, because no compiler fully implements the C99 standard.
There is no such thing as a faggot because you do not implement the anus standard.

C++ is not a superset of C.  It's just very similar.  GCC has pretty good C99 support, and there are some very nice things in C99 that just don't work in C++.  (You may say they'll be in Cocks, but by the time Cocks is supported it'll be compared to C1x instead of C99.)

NOT ALL C CODE COMPILES AS C++


$ cat test.c
#include <stdlib.h>
int main(int argc, char *argv[]) {
    int *p = malloc(sizeof(*p) * 100);
    return 0;
}
$ gcc test.c
$ g++ test.c
test.c: In function ‘int main(int, char**)’:
test.c:3:37: error: invalid conversion from ‘void*’ to ‘int*’


You have to go in and add casts to all the "malloc" calls.  Replacing it with "new" would not work because "new" throws exceptions when it fails.

NOT ALL C CODE GIVES THE SAME RESULTS WHEN COMPILED AS C++


$ cat test.c
#include <stdio.h>
int main(int argc, char *argv[]) {\
    printf("%zu\n", sizeof('a'));
    return 0;
}
$ gcc test.c ; ./a.out
4
$ g++ test.c ; ./a.out
1

Name: Anonymous 2010-09-26 20:03

>>19
Whoa, 'c' isn't of type char in C? I learned something new today.

Name: Anonymous 2010-09-26 21:38

>>16
back to /b/ please

Name: Anonymous 2010-09-26 22:33

>>21
lolol yhbt

Name: Anonymous 2010-09-26 22:41

>>19
There are compilers who fully implement C99.
Sun Studio is one of them.

Name: Anonymous 2010-09-26 23:15

>>20
Correct.  In C, character constants are of type int.  This was changed in C++ so you could do shit like this (although printf is still superior):


void f(int x) {
    std::cout << x << '\n';
}

Name: Anonymous 2010-09-27 2:19

>>24
Aren't the integral promotions performed on the operands of the << operator, which causes '\n' to promote to int anyway?

Name: Anonymous 2010-09-27 3:03

>>23
Though the compiler defaults to supporting the features of C99 listed below, standard headers provided by the Solaris software in /usr/include do not yet conform with the 1999 ISO/IEC C standard.

Sounds like a real nice C99 compiler.

Name: Anonymous 2010-09-27 13:21

>>26
I guess I shouldn't believe everything Wikipedia says.

Name: Anonymous 2010-09-27 18:00

>>25
No.  If that were the case, then that code would not work correctly.

Name: Anonymous 2010-12-06 10:04

Back to /b/, ``GNAA Faggot''

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List