https://bugs.winehq.org/show_bug.cgi?id=57061
Bug ID: 57061 Summary: SRWLock is slower than CriticalSection on wine. Why? Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: euloanty@live.com Distribution: ---
https://github.com/cppfastio/fast_io/blob/next/benchmark/0002.file_io_tsc/ti...
[cqwrteur@DESKTOP-9B705LH time]$ wine ./iobuf_file_lockable_critical_section.exe output:0.3784567s input:0.1407622s [cqwrteur@DESKTOP-9B705LH time]$ rm *.txt [cqwrteur@DESKTOP-9B705LH time]$ wine ./iobuf_file_lockable_srwlock.exe output:0.5857926s input:0.3284965s [cqwrteur@DESKTOP-9B705LH time]$ rm *.txt
This is very strange tbh. Because on windows SRWLock is faster than CriticalSection. I have checked wine's implementation and I don't see why SRWLock is slower than CriticalSection on wine either since the implementation is very simple.