TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: THOMAS MAEDER
from: CHRIS DOWNS
date: 1997-04-02 10:00:00
subject: Re: Streams

 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.