http://bugs.winehq.org/show_bug.cgi?id=59514 Bug ID: 59514 Summary: Significant time()/localtime() Performance Regression in Wine 11.4 Product: Wine Version: 11.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ucrtbase Assignee: wine-bugs@list.winehq.org Reporter: wszqkzqk@qq.com Distribution: --- Created attachment 80538 --> http://bugs.winehq.org/attachment.cgi?id=80538 Minimal reproducer: time() / localtime() performance regression in Wine 11.4 Repeated calls to `time()` and `localtime()` are significantly slower in Wine 11.4 compared to Wine 11.3. A tight loop calling these functions 10000 times shows a clear regression in per-call cost. The same program compiled and run natively on Linux is orders of magnitude faster, confirming the overhead is in Wine's translation layer. Compared with Wine 11.3, per-call cost increases from about 12.8 us to about 319 us, roughly a **25x slowdown**. ## Environment - Host OS: Arch Linux, Latest - CPU: AMD Ryzen 5800H (laptop without power) - Wine versions tested: 11.3 / 11.4 ## Minimal Reproducer Single-file C program. See in the attachment. Build as a Windows PE executable (e.g. using a Windows-native gcc under Wine): ```bash wine gcc -O2 -o time_bench.exe time_bench.c ``` Build as a native Linux executable for baseline comparison: ```bash gcc -O2 -o time_bench time_bench.c ``` Run: ```bash # Wine wine ./time_bench.exe # Native Linux baseline ./time_bench ``` ## Reproduction Steps 1. Compile `time_bench.exe` as a Windows PE executable. 2. Compile `time_bench` as a native Linux executable on the same machine. 3. Run the PE binary under Wine 11.3 — record the output. 4. Run the same PE binary under Wine 11.4 — record the output. 5. Run the native Linux binary — record the output as baseline. 6. Compare the `ns/call` values. ## Expected Result Per-call cost of `time()` and `localtime()` should be roughly the same between Wine 11.3 and Wine 11.4. ## Actual Result Wine 11.4 shows a significant increase in per-call cost. ### Wine 11.3 ```text iterations: 10000 time() : 0.128437 s (12844 ns/call) localtime() : 0.129727 s (12973 ns/call) sink=17732949360000 ``` ### Wine 11.4 ```text iterations: 10000 time() : 3.196547 s (319655 ns/call) localtime() : 3.184343 s (318434 ns/call) sink=17732948683316 ``` ### Native Linux (baseline) ```text iterations: 10000 time() : 0.000103 s (10 ns/call) localtime() : 0.058464 s (5846 ns/call) sink=17732948500000 ``` -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.