Jump to content
Welcome, welcome! Come in and register, and have some developer coffee. 👨‍💻 ×

Contest Idea #2: How fast your program can copy a 2GB single file?


Recommended Posts

Too bored at home, so I create a small Windows program in Assembly language trying to compete with CMD.exe COPY command.

And this is the differences:

ENTRY1 (S/L) is CMD.exe's COPY command

ENTRY2 (S/L) is my READFILEEXS/L.EXE

ENTRYS.thumb.PNG.566d6dcd074156f129484297fb6c5507.PNG

 

With buffer allocated at 1024 bytes per chunk, my EXE is way behind CMD.exe COPY.  Could not beat Microsoft's although I too am using the same Win32 API.

4MB

297ms

171ms


2GB

1m 10s 281ms

0m 25s 750ms

Look, for copying 2GB single file, my own program took 1 minutes 10 seconds, meanwhile CMD.exe COPY took 25 seconds only.

 

Do you have more contest idea? Or do you want to join me in writing the closest ressemblance of Windows native COPY command, in term of speed and accuracy (e.g. Src and Dest are identical. no data loss)?

Or if you prefer to play this yourself at your own pace, you can download my example suite (and test suite) FILECOPY.zip complete with my Assembly source code. But you need to create two files with filename SMALL.BIN (any size from few MBs to less than 1GB) and LARGE.BIN (up to 2GB) yourself.

Have fun!

FILECOPY.zip

Edited by FlierMate
Link to post
Share on other sites
1 hour ago, ChronoX said:

why not CopyFile or CopyFileEx?

Ah, did not know there are CopyFile(Ex) API available for copying file.

Mine can also dump file output besides redirect output to another file (thus, "copying" file).  I think that's why because I use ReadFile and WriteFile API, it makes the process slower.

Thanks for the enlightenment.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...