From owner-freebsd-current@FreeBSD.ORG Mon Sep 17 21:36:56 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8451216A468 for ; Mon, 17 Sep 2007 21:36:56 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 39F7B13C45D for ; Mon, 17 Sep 2007 21:36:56 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from [192.168.2.100] ([172.21.151.2]) by smtp-3.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 17 Sep 2007 23:36:55 +0200 Message-ID: <46EEF38A.6030304@dlr.de> Date: Mon, 17 Sep 2007 23:37:14 +0200 From: Hartmut Brandt Organization: German Aerospace Center User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Anders Magnusson References: <46EAA12D.4090207@ludd.ltu.se> <46EEC9AB.2010805@dlr.de> <46EEE02F.10409@ludd.ltu.se> In-Reply-To: <46EEE02F.10409@ludd.ltu.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Sep 2007 21:36:55.0461 (UTC) FILETIME=[DE4E4D50:01C7F972] Cc: freebsd-current@freebsd.org Subject: Re: Compiling with another compiler than gcc. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 21:36:56 -0000 Anders Magnusson wrote: > Hi, > > Hartmut Brandt wrote: >> Anders Magnusson wrote: >>> It is not yet bug-free, but it can compile the i386 userspace. The >>> big benefit of it >>> (apart from that it's BSD licensed, for license geeks :-) is that it >>> is fast, 5-10 times >>> faster than gcc, while still producing reasonable code. The only >> >> When reading the name pcc my first thought was: isn't that the >> compiler that was distributed on later Unix V7 tapes? And yes, the >> web-page says it is based on that one. I'm quite sure that the >> original code had no BSD copyright, so I wonder how it obtained one? >> For the rewritten code there is no question, but what for the >> remaining original code? Has it been relicensed by the original author? > Caldera released it with BSD license some 6 years ago, as part of their > "ancient unix". I've still one of these licenses that costed $100 in the beginning :-( So that looks ok. > >> It's interesting that the compiler is so much faster than gcc. I >> remember that it was around 3-5 times slower than the dmr compiler >> under V7. This tells a lot about gcc's speed :-( >> > Yes, and you are remembering correct. And yes, it says something about > gcc. > Even more interesting is that there are lots of quite slow sanity check > code in > pcc, despite that it's really fast. I suppose that the slowness when compared to Ritchie's compiler was because it was much larger (causing a lot of swapping) and it uses lex and yacc instead of hand-written parsers and lexers. Those where much slower on a PDP11. Nowadays this shouldn't make a big difference, though. The slowness of gcc comes probably from the machine-independent code representation in the backend. At least I remember a speed drop of a factor 3-4 when they inventend it going from gcc1.x to gcc2.x Nice to hear, that you're working on this! harti