Binary v. Text, why is it faster?



I have constantly seen and heard that reading binary data is faster than reading textual data. I have always presumed this to be a fact. But now I am at the point where I would like to understand why.

I was trying to think about it, and it has rather confused me. To my understanding, reading a text file is reading in the bytes which correspond to, for example, ASCII character codes. But if we are dealing with a 1-byte character encoding, how is it slower to read in 'a' rather than some binary representation of that?

And in addition to this, what is the actual difference between binary and textual files? I had always thought that a binary file was simply a file composed of any combination of bytes, whereas a text file was a file composed of a limited subset of the bytes available to a binary file. Am I misunderstanding something here?

I guess I just don't see how reading in AF would be slower just because AF appears in a text file instead of a "binary" file?

- Arctic

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
.



Relevant Pages

  • Re: Call to database causes subsequent calls to be slow
    ... what happens AFTER you read the data becomes much slower? ... you can establish a connection to SQL Server would slow down due to having ... > expect the reading from the historical database to be slower than ...
    (microsoft.public.sqlserver.programming)
  • Re: Slowing down
    ... I know at least two writers who still do their first drafts in longhand ... writers, is a good bit slower than they read, and sometimes slower than they ... on a word-by-word level. ... in dialog that read OK when you're reading, ...
    (rec.arts.sf.composition)
  • Re: Binary v. Text, why is it faster?
    ... reading textual data. ... But watch what happens when I concatenate two copies together: ... EOF character per file and it better be the last one. ...
    (comp.programming)
  • Re: parsing a file..
    ... told that reading the file in ascii would be a slower way to do it and ... so i need to resort to binary by reading it in large chunks. ... I could parse 2000 lines in hardly any time and there was no problem ... will be slower because of needing to parse and ...
    (comp.lang.c)
  • Re: Binary v. Text, why is it faster?
    ... reading textual data. ... To my understanding, reading a text file is reading in the bytes which correspond to, for example, ASCII character codes. ... Also some editors will helpfully display an unaccompanied 0x0a as ^M which is really helpful, thanks guys, really makes things a lot more readable, as if you didn't understand what had happened here. ...
    (comp.programming)