From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20909 invoked by alias); 27 Jan 2005 15:05:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20791 invoked by uid 48); 27 Jan 2005 15:05:41 -0000 Date: Thu, 27 Jan 2005 15:05:00 -0000 Message-ID: <20050127150541.20790.qmail@sourceware.org> From: "joerg dot richter at pdv-fs dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050126142651.19642.joerg.richter@pdv-fs.de> References: <20050126142651.19642.joerg.richter@pdv-fs.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/19642] streaming doubles is very slow compared to sprintf X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg04047.txt.bz2 List-Id: ------- Additional Comments From joerg dot richter at pdv-fs dot de 2005-01-27 15:05 ------- With patch draft_19642_3 and count=1000000 $ time t > /dev/null real 0,64 user 0,60 sys 0,01 $ time t cout > /dev/null real 1,14 user 1,12 sys 0,00 Now its only 2 times slower than sprintf. Much better than the ~75 times before. Also note, that when an other locale than "C" is in place the times also get better: without patch: (count=100000) real 28,27 user 6,34 sys 21,87 with: real 5,66 user 1,89 sys 3,78 (sprintf:0,07s) This case is still horrible slow, but 4-5 times better than before. Good work so far, but I think the final solution is to avoid any frequent setlocale() calls. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19642