Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border1.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: Mon, 17 Oct 2016 22:49:40 +0100 Organization: A noiseless patient Spider Lines: 26 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-10-009@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-048@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="78024"; mail-complaints-to="abuse@iecc.com" Keywords: C, performance Posted-Date: 21 Oct 2016 13:00:53 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1796 On 30/09/2016 12:28, BartC wrote: > On 29/09/2016 14:03, BartC wrote: > >> [Tokenizing 10M lines/sec is pretty impressive. In compilers that don't >> do heavy optimization >> the lexer is usually the slowest part since it's the only thing that has >> to touch each >> character of the source code individually. -John] > > This is what I was putting to the test. Actually I struggled to recreate > that benchmark, but in the end managed to process actual C source (a > monolithic file containing all CPython sources) at some 9.7Mlps. Figures > do depend on the source style. I've put a version of that test program here as a C file: https://github.com/bartg/langs/blob/master/clex.c When I ran this on an original Raspberry Pi that struggled to do anything fast (gcc ran at 500 lines per second, unoptimised), it managed 1.3M lines per second. -- Bartc