From owner-freebsd-hackers Thu Apr 26 6:11:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from heechee.tobez.org (254.adsl0.ryv.worldonline.dk [213.237.10.254]) by hub.freebsd.org (Postfix) with ESMTP id 3565E37B423 for ; Thu, 26 Apr 2001 06:11:30 -0700 (PDT) (envelope-from tobez@tobez.org) Received: by heechee.tobez.org (Postfix, from userid 1001) id CE8F6547A; Thu, 26 Apr 2001 15:11:26 +0200 (CEST) Date: Thu, 26 Apr 2001 15:11:26 +0200 From: Anton Berezin To: Greg Black Cc: hackers@freebsd.org Subject: Re: gcc -O bug Message-ID: <20010426151126.E17373@heechee.tobez.org> References: <20010426144848.B17373@heechee.tobez.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from gjb@gbch.net on Thu, Apr 26, 2001 at 11:00:15PM +1000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Apr 26, 2001 at 11:00:15PM +1000, Greg Black wrote: > Anton Berezin wrote: > > | Could you provide the Perl script as well? > > That would be pointless. The issue is with the C ... I know that. > | I am quite sure it can be > | made to run faster. In fact, it is almost always possible in Perl to > | closely match the perfomance of a C program for this kind of > | application. > > Nonsense (unless the C program is written by an idiot). Nope. The real nonsense is what you say. Perl core is written in a highly optimized C using very polished algorithms. As long as the Perl script is written in such a way as to minimize the number of OPCODEs executed and maximize the time spent inside the OPCODE executor engine, it is not exactly trivial to beat it in C, unless you are willing to spent a considerable time polishing your code (which is not worth it for your typical log analyzer). Cheers, +Anton. -- May the tuna salad be with you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message