Why does the binary comparison use a buffer?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pete
    Fanatic
    • Nov 2007
    • 190

    Why does the binary comparison use a buffer?

    I'm wondering why BC's binary comparison adds the overhead of managing its own 64 KB buffer. All I want it to do is to read one byte at a time from each file and report if they're different. I'm under the impression that Windows has buffered file reads and writes since the DOS days (e.g. SmartDrv.sys), so it seems like an unnecessary use of resources for BC to do what Windows is already doing.
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    Reading a byte at a time from the file, regardless of how fancy Windows' caching techniques are is not and will never be faster than reading a buffer at a time and comparing the whole thing.
    Zoë P Scooter Software

    Comment

    Working...