https://bugs.winehq.org/show_bug.cgi?id=57388
--- Comment #2 from LekKit nyandarknessgirl@gmail.com --- Thank you very much, it's really a huge improvement. Here are new results:
Wine 9.21 on the same host, synchronous ReadFile() with OVERLAPPED file position
512b reads: 634344.851175 IOPS, 309.738697 MB/s 4k reads: 628872.834744 IOPS, 2456.534511 MB/s 1M reads: 18620.033840 IOPS, 18620.033840 MB/s
It's still slightly slower than a native version, but according to `strace` it's just doing another lseek() to conform to WinAPI properly (ReadFile()/WriteFile() seeks after buffer even with synchronous OVERLAPPED mode). That explains why it's ~2x slower for 512b/4k reads, as the syscall entry latency dominates the execution time (Mitigations enabled).
A pretty good result overall, improving it further would require moving the file pointer into userspace which I'm not sure is doable for Wine at all.
Best regards