public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/11706] New: std::pow(T, int) implementation pessimizes code
@ 2003-07-29 12:03 rguenth at tat dot physik dot uni-tuebingen dot de
  2003-07-29 12:39 ` [Bug libstdc++/11706] " steven at gcc dot gnu dot org
                   ` (49 more replies)
  0 siblings, 50 replies; 52+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2003-07-29 12:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11706

           Summary: std::pow(T, int) implementation pessimizes code
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu

The std::__pow_helper() implementation ends up emitting a call to
std::__cmath_power() for all constant powers as f.i. in the call to
std::pow(x, 2). This severly pessimizes code and can be cured by teaching
optimal computation to std::__pow_helper() via the __builtin_constant_p
mechanism of gcc.

See http://gcc.gnu.org/ml/gcc/2003-07/msg01950.html for an example improved
implementation.

The same problem exists on the 3.3 branch.


^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2005-05-07 19:56 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 12:03 [Bug libstdc++/11706] New: std::pow(T, int) implementation pessimizes code rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 12:39 ` [Bug libstdc++/11706] " steven at gcc dot gnu dot org
2003-07-29 12:53 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 13:01 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 13:19 ` gdr at integrable-solutions dot net
2003-08-23  1:56 ` dhazeghi at yahoo dot com
2003-09-29 15:05 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-09-29 15:11 ` gdr at integrable-solutions dot net
2003-09-29 15:29 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-09-29 15:41 ` gdr at integrable-solutions dot net
2003-09-29 15:43 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-09-29 17:30   ` Gabriel Dos Reis
2003-09-29 17:36 ` gdr at integrable-solutions dot net
2003-11-13 21:42 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-12-05 23:52 ` bkoz at gcc dot gnu dot org
2003-12-06 18:26 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-12-06 19:26 ` gdr at integrable-solutions dot net
2003-12-06 19:50 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-12-06 20:05 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-12-06 20:33 ` gdr at integrable-solutions dot net
2004-03-10 15:14 ` pcarlini at suse dot de
2004-03-10 15:34 ` gdr at integrable-solutions dot net
2004-03-10 15:43 ` pcarlini at suse dot de
2004-03-10 19:51 ` gdr at integrable-solutions dot net
2004-03-10 20:01 ` pcarlini at suse dot de
2004-03-10 20:19 ` gdr at integrable-solutions dot net
2004-03-10 20:26 ` pcarlini at suse dot de
2004-03-10 20:43 ` gdr at integrable-solutions dot net
2004-03-10 22:27 ` pcarlini at suse dot de
2004-03-10 22:39 ` gdr at integrable-solutions dot net
2004-03-10 22:45 ` bangerth at dealii dot org
2004-03-10 22:47 ` pcarlini at suse dot de
2004-03-10 23:39 ` gdr at integrable-solutions dot net
2004-03-11 10:42 ` cvs-commit at gcc dot gnu dot org
2004-03-11 11:37 ` cvs-commit at gcc dot gnu dot org
2004-03-11 12:06 ` pcarlini at suse dot de
2004-03-11 18:55 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-03-11 19:04 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-03-11 20:14 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-03-12  1:43 ` rakdver at gcc dot gnu dot org
2004-05-16 22:22 ` pinskia at gcc dot gnu dot org
2004-09-23 18:22 ` pinskia at gcc dot gnu dot org
2004-10-02  4:04 ` pinskia at gcc dot gnu dot org
2004-10-02  4:06 ` pinskia at gcc dot gnu dot org
2005-01-12 16:17 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-02-07 22:33 ` rguenth at gcc dot gnu dot org
2005-02-10  0:43 ` rguenth at gcc dot gnu dot org
2005-02-10  1:13 ` pcarlini at suse dot de
2005-02-10  1:13 ` rguenth at gcc dot gnu dot org
2005-02-13 19:18 ` cvs-commit at gcc dot gnu dot org
2005-02-13 19:18 ` pcarlini at suse dot de
2005-05-07 19:56 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).