CD> Most of the "disadvantages" to iostreams are implentation dependant
CD> For example, iostream i/o takes more code space and takes more
CD> execution time vs output. But there's no intrinsic reason
CD> that _has_ to be!
TM> Have you been able to measure this?
Here's an example. The first program is...
#include
int main() {
cout << "Hello World" << endl;
return 0;
}
and the second program is...
#include
int main() {
printf ("Hello World\n");
return 0;
}
For one particular compiler (VC++) the stream version size is 31744 and
the stdio version's size is 23552.
As for measuring execution speed, I haven't done any tests. For
the kind of I/O I typically use, the speed of the code execution isn't
what dominates I/O execution time anyway.
TM> Sounds very strange to me; I
TM> expect streamio to be more efficient both for space and time.
Perhaps someday.
---
þ Blue Wave/QWK v2.12 þ
---------------
* Origin: St. Louis Users Group (1:100/4)
|