Thanks for the script, I can reproduce the problem with it (I had to change "Reserved Clusters" to the localized version, though).
Allocating these clusters doesn't seem to be a bug, but not releasing them probably is. They are described as follows (e.g.
here):
Reserved clusters are clusters that NTFS reserves just in case it needs to allocate space for a critical operation (like expanding a compressed file or extending the $MFT).
So NTFS sees some type of access to that sparse file, decides that it may be necessary to actually allocate the full data, and then reserves the memory for it.
On my system, even xcopy seems to trigger the problem:
Type NUL > temp
FSUtil Sparse SetFlag temp
FSUtil Sparse SetRange temp 0 0x40000000
FSUtil File SetEOF temp 0x40000000
echo abcd >> temp
xcopy /-I temp.txt temp2.txt
After the xcopy command, the size of the reserved clusters has jumped by the size of the sparse file, no "Properties" dialog necessary. Can you reproduce that?
BTW, CrcBlake3BlockSize=0 (no memory mapping) works much faster on my system (tested with a normal 40GB file with mainly zeros).
Are you sure this isn't a cache problem? Here the multi-threaded function is considerably faster on an NVMe SSD, and equally fast on a SATA SSD, and not used on a harddisk.