News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

SHA1 revisited.

Started by hutch--, January 12, 2011, 05:26:19 AM

Previous topic - Next topic

hutch--

i looked at the times over a range and while it started to get slower with buffer sizes under 16k, it did not start to slow on the other end until it was much larger so I took the small end (16 to 64k) as larger did not make it faster. I agree that hardware has much to do with the read speed, i am testing on WD 1tb green disks which burst at about 180 meg/sec and sustain at about 100 meg/sec. I guess it still has some to do with how both CreateFile() and ReadFile() interact with the way the crypto algos were written as in most instances where I have to work from disk, much larger buffers are faster and 32 meg is no big deal these days.

The disk IO is still a lot slower than processor and even though the crypto algos do a lot of work there will still be some lag time and I think it is here that the very large buffers impact on speed. It may be worth splitting the technique into different threads so that you some asynchronous overlap between disk IO and processor occurs.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php