phcomp -- compare files with timer, bypassing operating system cache
--- open source freeware ---

[page last modified 2/11/2015]

phcomp is a command line program that reads a file in large chunks, displaying a timer as the operation proceeds. It is intended to be used with large files to measure the performance of a storage device (eg. a Blu-ray drive).

A second file can be specified to invoke file compare mode; in this case, both files are read and their contents compared up to the size of the smaller file. If a difference is encountered the comparison stops.

File access avoids using/altering the operating system cache -- thus the timing reflects the performance of the underlying device. Also the compare insures what is on the media is truly compared; important, for instance, if working with a questionable/counterfeit flash device.

The Win32 C source is provided; it is freeware, there are no restrictions on its use, but no guarantee is given. The source has been compiled and tested with Microsoft Visual C compilers versions 6, 7.1, 9, 10 and 12.

Compares files w/timer.  Ver 2.0, 2/11/2015
If second file omitted, first file is read and discarded.

Bypasses operating system cache to produce consistent timings
and a true test of the underlying storage medium.

  Usage:  phcomp {-opt(s)} file1 {file2|path}

-?    This display
-d#   Display # chars of file name
-b#   Read buffer size (4k min, default 4 meg)
-o#   Start file offset
-m#   Max file offset (-m for smallest filesize)

Change Log

version 2.0 released 2/11/2015:   Shrunk .exe to 4k by removing C stdlib.

Click here to download

version 1.9 released 1/20/2015:   Allowed -m option to be empty to indicate smallest file size.   Fixed bug not returning 0 exitcode on match.

Click here to download

version 1.7 released 1/6/2015:   Added -d option, fixed -o bug.  Allowed 2nd filespec to be a path.

Click here to download

version 1.6 released 11/23/2014:  Increased default read buffer size, added -o and -m options.

Click here to download

version 1.4 released 6/20/2014:  Initial Win32 version.

Click here to download

You are visitor 4993        Go to Home Page