From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6052 invoked by alias); 29 Jul 2003 12:58:05 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 6032 invoked from network); 29 Jul 2003 12:58:02 -0000 Received: from unknown (HELO mx03.uni-tuebingen.de) (134.2.3.13) by sources.redhat.com with SMTP; 29 Jul 2003 12:58:02 -0000 Received: from bellatrix.tat.physik.uni-tuebingen.de (bellatrix.tat.physik.uni-tuebingen.de [134.2.170.113]) by mx03.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id h6TCw0en003239; Tue, 29 Jul 2003 14:58:00 +0200 Received: from bellatrix.tat.physik.uni-tuebingen.de (localhost [127.0.0.1]) by bellatrix.tat.physik.uni-tuebingen.de (8.12.3/8.12.2/SuSE Linux 0.6) with ESMTP id h6TCw0KA004897; Tue, 29 Jul 2003 14:58:00 +0200 Received: from localhost (rguenth@localhost) by bellatrix.tat.physik.uni-tuebingen.de (8.12.3/8.12.3/Submit) with ESMTP id h6TCvxQ9004894; Tue, 29 Jul 2003 14:57:59 +0200 X-Authentication-Warning: bellatrix.tat.physik.uni-tuebingen.de: rguenth owned process doing -bs Date: Tue, 29 Jul 2003 13:28:00 -0000 From: Richard Guenther To: Andrew Pinski cc: Gabriel Dos Reis , Steven Bosscher , Subject: Re: std::pow implementation In-Reply-To: <1212C9BE-C1C3-11D7-AC2E-000393A6D2F2@physics.uc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-AntiVirus: checked by AntiVir Milter 1.0.2; AVE 6.20.0.1; VDF 6.20.0.50 X-SW-Source: 2003-07/txt/msg01981.txt.bz2 On Tue, 29 Jul 2003, Andrew Pinski wrote: > On Tuesday, Jul 29, 2003, at 08:43 US/Eastern, Richard Guenther wrote: > > On 29 Jul 2003, Gabriel Dos Reis wrote: > > > > To show you some of the performance improve I get with my "hacked" > > __pow_helper(), the average time for one iteration of my scientific > > app dropped from 2.6s to 1.8s - this is a 30% improvement. Not to say > > I ever expected gcc (or libstdc++) to not create x*x out of > > std::pow(x,2). > > If you use ::pow instead, gcc does change it to be x*x on the mainline > at least. Why isnt this done for std::pow? Any particular reason? Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/