User loginNavigationTake FREE online C/C++ test now!Unix / Linux ProgrammingCode search made simpleYour feedback needed!As a webmaster of this site, I regard you as our most important critic and commentator. We value your opinion and want to know what we are doing right, what we could do better and any other words of wisdom you're willing to pass our way. It would be our greatest motivation which will help us in developing areas you would like to see in this site. We hope you will continue to encourage and support us in our future endeavors.
INDIA |
C, C++, VC++ Etc.Re: fstream Buffers
You're done once the data reaches here. There's no guaranteed way to
bypass this caching, nor any value in doing so for most applications (certainly any application using fstream). We can pretend it does not exist. Moving data between processors is actually pretty cheap, especially Re: No templates for performance?
Well. That's more than 10 years!
Anyways, given how the MS compiler handles C and C++, my personaly guess What information is this statement based on? Re: function to initialize vector from {1,2,3,4}
In C++11 you can do this:
int myints[] = { 16, 2, 77, 29 }; It might even be standard to omit the "std::begin()" part and use OT usenet netiquette Re: function to initialize vector from {1,2,3,4}
That issue isn't caused by the sender, only by the receiver's Usenet client.
Text lines which exceed 77 characters are perfectly valid, and they are properly handled by some Usenet clients. The only problem which may be associated with them is that some Usenet clients do a bad job handling long Re: fstream Buffers
Op 18-May-12 0:13, Mike Copeland schreef:
I vaguely remember there was an issue with the iostream implementation Re: design issue
I don't understand what you're getting at. It's obvious from his
posting that A and B only exist as placeholder names in the posting itself. And it's obvious from *our* postings that we don't like that. What's there to argue about? ... I don't want to be involved in a heated discussion about that, too. Re: function to initialize vector from {1,2,3,4}
I wasn't telling him he didn't need it -- I was *asking* him.
/Jorgen -- Re: design issue
well I think A and B are poor names. I really hope the actual code doesn't use them. How do you /know/ A and B have meaning and responsibilities assigned to them?
Besides we do know that A "manages requests/commands from external systems". So ProcessExternalCommand:: seems pretty reasonable. Re: function to initialize vector from {1,2,3,4}
That's such a "windowsy" answer. "If you can't do it, you don't need it."
Re: No templates for performance?
"Can be used safely" != "safe".
Did you miss the "optimize the code on a type-by-type basis" part? Re: fstream Buffers
On 17 May 2012 21:28:53 GMT, sc...@slp53.sl.home (Scott Lurndal)
wrote: If he was going to do something that system dependent, it would be far Re: fstream Buffers
Look at the public methods of the filebuf object in the fstream to set
you own buffer. scott Re: fstream Buffers
I can't repeat that result here (Linux, gcc -Os).
fVar2 << line << endl; ./filecopy 0.89s user 2.81s system 98% cpu 3.774 total fVar2 << line << '\n'; ./filecopy 0.36s user 0.19s system 97% cpu 0.565 total Re: fstream Buffers
Instead, for this context I'd suggest:
fVar2 << line << '\n'; Also, fstream exposes a read() member function. You can do the same Re: fstream Buffers
You need to learn your tools. Determine if it's an optimized build or
not, and get back to us. If you're using default settings, there's probably a toolbar with a couple dropdowns, one for "config" and one for "platform". Currently, the toolbar in my IDE reads; "Debug" "Win32". Change "Debug" to "Release", compile, run, and see if that Re: fstream Buffers
In article <p4etr.3$l...@news.usenetserve r.com>, sc...@slp53.sl.home
says... That's not the point here: I'm writing applications that do a lot of Re: fstream Buffers
In article <slrnjraqrk.rk7.grahn+n...@fra ilea.sa.invalid>,
grahn+n...@snipabacken.se says... And doing so (appending the '\n' to "line" prior to writing it) has no effect. I.e. while(getline(fVar1, line)) Same 12x-13x performance degradation with this code versus Re: fstream Buffers
Doing so has no effect whatsoever; code follows:
line +='\n'; Re: fstream Buffers
In article <d6c93c71-68ed-42a0-a7fd-79337 601c170@googlegroups.com>,
carte...@gmail.com says... Okay, that's useful. Guess I'll have to append a '\n' to the data line prior to the "<<" operator. 8<}} Re: fstream Buffers
In article <a328e357-9312-4971-99ba-1b18c 2f21d86
@s9g2000pbc.googlegroups.com>, joshuamaur...@gmail.com says... Unfortunately, a "silly answer": I don't know what compiler flags and/or efficiencies are involved (don't know how to find out...), and it's VS6.0 (which everyone here condemns, but it's all I have. |