|Re: Architecture description languages for compilers? firstname.lastname@example.org (1993-01-28)|
|Thompson's 2c vs. gcc email@example.com (Michael John Haertel) (1993-01-29)|
|Re: Thompson's 2c vs. gcc firstname.lastname@example.org (1993-02-02)|
|Re: Thompson's 2c vs. gcc email@example.com (Michael John Haertel) (1993-02-04)|
|Re: Thompson's 2c vs. gcc firstname.lastname@example.org (1993-02-04)|
|Re: Thompson's 2c vs. gcc email@example.com (1993-02-05)|
|Re: Thompson's 2c vs. gcc firstname.lastname@example.org (1993-02-05)|
|From:||Michael John Haertel <email@example.com>|
|Date:||Fri, 29 Jan 1993 04:41:12 GMT|
>It is an amusing exercise to compare the listed md sizes for the Thompson
>compiler to the GCC md sizes for the same machines. I can't say whether
>the code is comparable: Thompson claims the compile time is half that of
>GCC and run time is 75% that of GCC, but it shows only slightly better run
>times than lcc, and a previous comp.compilers article said lcc was
>substantially worse than GCC.
I've used 2c. My experience is that gcc produces better code, contrary to
Thompson's claim. He most likely forgot to turn on -O with gcc. Without
-O, gcc produces really pessimal code, considerably slower than pcc
without -O for example.
The gcc source code (currently ~200,000 lines for the machine independent
part only, not counting the C++ and ObjC front ends) is more than 10 times
the size of the 2c source code. I would not say that gcc produces 10
times better code. Perhaps 10% better. This may be another case of 90%
of the benefit for 10% of the work. In addition, 2c compiles much faster.
Thompson's claim that 2c typically compiles in 50% of the time gcc takes
is probably an understatement, in fact. 2c is the most nearly I/O-bound
compiler I've ever used.
Return to the
Search the comp.compilers archives again.