Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: BartC Newsgroups: comp.compilers Subject: Re: Alternative C compilers on x86_64 Linux? Date: Fri, 30 Sep 2016 12:00:09 +0100 Organization: A noiseless patient Spider Lines: 29 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-09-047@comp.compilers> References: <16-09-001@comp.compilers> <16-09-033@comp.compilers> <16-09-034@comp.compilers> <16-09-035@comp.compilers> <16-09-037@comp.compilers> <16-09-042@comp.compilers> <16-09-044@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="7217"; mail-complaints-to="abuse@iecc.com" Keywords: C, performance Posted-Date: 30 Sep 2016 11:30:11 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 2267 X-Received-Body-CRC: 1786089835 Xref: csiph.com comp.compilers:1786 On 30/09/2016 04:03, Hans-Peter Diettrich wrote: > BartC schrieb: > >> (I can tokenise C source code at some 10M lines per second on my PC ... > > IMO it's not the header files, which slow down compilation, but the > preprocessor macros which require to look up and optionally expand every > token. ... > In so far I don't think that it's fair or > meaningful to compare a full blown compiler with a bare tokenizer. I seem to remember some comment in this group that tokenising accounts for a big chunk of a compiler's runtime (50% or something). While it is true that doing a full compile will take longer than just raw tokenising, should that factor be of the order of 1000 times longer, or three magnitudes? I was investigating whether a reasonable working compiler could be developed working at between 1 and 2 magnitudes slow-down from the raw tokenising speed. Probably one magnitude is a little optimistic, for C source anyway (with preprocessing and stuff also needed), but two magnitudes is easily on the cards. I think Tiny C is within that range. -- Bartc