tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pcc [was Re: valgrind]



Den 2022-03-22 kl. 18:47, skrev Koning, Paul:

On Mar 22, 2022, at 1:21 PM, Greg A. Woods <woods%planix.ca@localhost> wrote:

At Mon, 21 Mar 2022 08:54:43 -0400 (EDT), Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
Subject: pcc [was Re: valgrind]
I've been making very-spare-time progress on building my own
compiler on and off for some years now; perhaps I'll eventually get
somewhere.  [...]
Have you looked at pcc?  http://pcc.ludd.ltu.se/ and in our source
tree in src/external/bsd/pcc .
No, I haven't.  I should - it may well end up being quicker to move an
existing compiler in the directions I want to go than to write my own.
...
I also really like PCC.  (I remember teething pains getting used to it
back when it first replaced Ritchie C on my university's PDP-11/60, but
once I actually used it for real code (i.e. assignments in those days),
and soon on the Vax too, I really liked it.)

I'm really sad that I still cannot build NetBSD entirely with PCC as the
native and only default compiler.
Out of curiosity: how does PCC code quality compare with that of GCC and (for targets that it supports) Clang?
Last time I tested (maybe 8 years ago?) against gcc with bytebench (IIRC? some of the benchmarks anyway) on i386 it generated code that was slightly smaller (gcc -O6) and on average 6% slower than gcc.

The slowliness was mostly due to the lack of strength reduction in loops.

-- R






Home | Main Index | Thread Index | Old Index