Difference in FileStream performance between windows XP and 7/8/10


I’m using the below simple code:
File InFile(“SourceFile.txt”);
FileInputStream InStream(InFile);
File OutFile(“DestFile.txt”);
FileOutputStream OutStream(OutFile);
InStream.setPosition(1024); //or something similarly small.
if (OutStream.openedOk())
int64 br = OutStream.writeFromInputStream(InStream, -1);

This does nothing more than scrapping the first 1024 bytes of source file and copy the rest to the destination file.

Source file is large, e.g. 250 MB. In windows 7 and above this operation completes in 1-3 seconds while in XP it takes around 3 minutes.

Does anyone know why? Has anyone observed anything similar? The horsepower of the machines is similar and both file systems are NTFS. XP is a VM but this itself cannot justify this huge difference in performance.


turns out that the huge difference in the performance was indeed due to the VM. Tried on a VM with win7 and got similar results. So, case closed.