Re: C# vs. C++
Daniel James wrote:
Usually iostreams are implemented using the 'printf()' family,
so it's very unlikely they're faster. It's sad, because with all
the type info known at compile-time streams ought to be faster
than 'printf()', but that potential was never used. Dietmar Kühl
once had an implementation that didn't do this and was regarded
fast, but for some reason it never took off.
Schobi
Daniel James wrote:
[...]
The fprintf and sprintf functions will always be slow as they have to
parse the formatting string each time as well as producing output, so I
wouldn't expect them to do well. I'd expect the iostreams version to be
a good bit quicker [...]
The fprintf and sprintf functions will always be slow as they have to
parse the formatting string each time as well as producing output, so I
wouldn't expect them to do well. I'd expect the iostreams version to be
a good bit quicker [...]
so it's very unlikely they're faster. It's sad, because with all
the type info known at compile-time streams ought to be faster
than 'printf()', but that potential was never used. Dietmar Kühl
once had an implementation that didn't do this and was regarded
fast, but for some reason it never took off.
[...]
Daniel.
Daniel.
Comment