Raw I/O vs. Stream I/O

This is a discussion on Raw I/O vs. Stream I/O within the C Programming forums, part of the General Programming Boards category; Could one compare for me raw I/O (open(), read(), write(), close()) to stream I/O. Thanks!...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    96

    Raw I/O vs. Stream I/O

    Could one compare for me raw I/O (open(), read(), write(), close()) to stream I/O. Thanks!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    What sort of comparison?

    One is portable (stream I/O) the other isn't (outside of Unix type Posix compatibility). Depending on how you go about it, you may get better performance with one or the other - generally, big chunks to read/write are faster with the "raw" interface.

    Note that some OS's + compilers (e.g. MS) provide functions the same as or similar to the raw interface, but this is not a RAW interface, so there will still be some overhead in that situation.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stream I/O
    By NuNn in forum C Programming
    Replies: 7
    Last Post: 02-23-2009, 01:33 PM
  2. Question: Stream I/O (working with strings)
    By ckuttruff in forum C Programming
    Replies: 15
    Last Post: 05-19-2008, 11:32 AM
  3. Overlapped I/O and Completion Port :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 10-30-2002, 04:14 PM
  4. i/o stream
    By lupi in forum C++ Programming
    Replies: 1
    Last Post: 09-09-2001, 12:55 AM
  5. Looping and I/O Stream
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 09-07-2001, 10:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21