public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ralfixx at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/21286] [4.0/4.1 Regression] filebuf::xsgetn vs pipes
Date: Sat, 30 Apr 2005 14:16:00 -0000	[thread overview]
Message-ID: <20050430141628.10522.qmail@sourceware.org> (raw)
In-Reply-To: <20050429155408.21286.ralfixx@gmx.de>


------- Additional Comments From ralfixx at gmx dot de  2005-04-30 14:16 -------
Paolo Carlini wrote:
> I'd like to know your opinion, as a user: are you
> noticing worthwhile performance improvements? 
> Would you consider very annoying trying to read again
> (calling clear()), when pipes are used? 

The issue seems already solved, but I'd like to add a comment to this question:
Yes, I would find it very annoying, since my program simply does not know
whether  a file descriptor is connected to a pipe or not.  Note that I have oly
checked for eof() im my program, so the above solution basically means: on
eof(), clear() and try to read again.  How often should I try this?  Etc.

Performance improvement or not, the stream should (must?) give the same results
regardless of the data source IMHO.  Performance can only be second here.

BTW, the program timing is as follows on my machine (reading from local file
system /tmp):

gcc 3.3.3: 
0.01user 0.01system 0:00.08elapsed 31%CPU (0avgtext+0avgdata 0maxresident)k
0.01user 0.00system 0:00.08elapsed 23%CPU (0avgtext+0avgdata 0maxresident)k
0.01user 0.01system 0:00.11elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
0.01user 0.01system 0:00.08elapsed 27%CPU (0avgtext+0avgdata 0maxresident)k

gcc 4.0.0 (when reading all bytes from the pipe, not with the short reads)
0.00user 0.01system 0:00.04elapsed 38%CPU (0avgtext+0avgdata 0maxresident)k
0.00user 0.01system 0:00.04elapsed 48%CPU (0avgtext+0avgdata 0maxresident)k
0.00user 0.01system 0:00.04elapsed 27%CPU (0avgtext+0avgdata 0maxresident)k
0.00user 0.01system 0:00.04elapsed 35%CPU (0avgtext+0avgdata 0maxresident)k

So yes, there seems to be a performance improvement (1.x CPU, half wall clock time).

Best regards
R'


-- 


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


  parent reply	other threads:[~2005-04-30 14:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 15:54 [Bug c++/21286] New: GNU extension stdio_filebuf problems when reading from pipe ralfixx at gmx dot de
2005-04-29 15:56 ` [Bug c++/21286] " ralfixx at gmx dot de
2005-04-29 15:58 ` ralfixx at gmx dot de
2005-04-29 17:28 ` pcarlini at suse dot de
2005-04-29 21:31 ` [Bug libstdc++/21286] " pcarlini at suse dot de
2005-04-30  2:12 ` [Bug libstdc++/21286] [4.0/4.1 Regression] filebuf::xsgetn vs pipes ncm-nospam at cantrip dot org
2005-04-30  3:49 ` ncm-nospam at cantrip dot org
2005-04-30  6:54 ` cvs-commit at gcc dot gnu dot org
2005-04-30  8:00 ` pcarlini at suse dot de
2005-04-30 14:16 ` ralfixx at gmx dot de [this message]
2005-04-30 15:49 ` ncm-nospam at cantrip dot org
2005-04-30 22:56 ` cvs-commit at gcc dot gnu dot org
2005-04-30 22:57 ` pcarlini at suse dot de
2005-05-01 17:44 ` ralfixx at gmx dot de
2005-05-01 18:12 ` pcarlini at suse dot de
2005-05-01 19:12 ` ralfixx at gmx dot de
2005-05-01 19:28 ` pcarlini at suse dot de
2005-07-14 20:53 ` amu at alum dot mit dot edu
2005-07-14 23:58 ` pcarlini at suse dot de
2005-07-18 12:17 ` ralfixx at gmx dot de
2005-07-18 12:46 ` pcarlini at suse dot de
2005-07-18 15:02 ` ralfixx at gmx dot de
2005-07-18 17:08 ` pcarlini at suse dot de
2005-07-18 18:35 ` cvs-commit at gcc dot gnu dot org
2005-07-18 18:40 ` [Bug libstdc++/21286] [3.4/4.0/4.1 " pcarlini at suse dot de
2005-07-18 18:51 ` pcarlini at suse dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050430141628.10522.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).