Re: why is my iostream program so much slower than equivalent cstdio program?
From: Alex Vinokur (alexvn_at_big-foot.com)
Date: 12/24/04
- Previous message: GianGuz: "Re: why is my iostream program so much slower than equivalent cstdio program?"
- In reply to: Mark: "Re: why is my iostream program so much slower than equivalent cstdio program?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Dec 2004 15:13:15 +0200
"Mark" <goldman@usgs.gov> wrote in message news:1103826689.229627.276620@f14g2000cwb.googlegroups.com...
> output.sync_with_stdio(false) has no effect on runtime
>
> However, using
> << '\n'
> instead of
> << endl
> did dramtically improve performance, from IOSTREAM
> being 10 times slower to being only twice as slow
[snip]
Yes, look at C/C++ Performance Tests:
endl vs. "\n/" and '\n'
for
stdout, stderr, cout, cerr, clog, ostringstream, cout-to-file, cerr-to-file, clog-to-file
http://groups-beta.google.com/group/comp.lang.c++/msg/f0a3f2c6e789dde7
http://groups-beta.google.com/group/misc.test/msg/ebdc73df3fd7df08
--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
- Previous message: GianGuz: "Re: why is my iostream program so much slower than equivalent cstdio program?"
- In reply to: Mark: "Re: why is my iostream program so much slower than equivalent cstdio program?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|