-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling projects with GCC 12.1 UCRT is painfully slow #107
Comments
Do you have this on more than one system? Do you know how to reproduce this so I can test for myself? Is the problem the same when antivirus is disabled? (Which antivirus do you use?) |
I only have laptop, so there is that :D I mostly noticed this with cmake when compiling targets with many (5+) header files containing classes/inline functions. MS defender, works the same with it disabled. Also by painfully slow, I mean 20s with UCRT instead of 5 with MSVCRT. |
I can't reproduce your issue. |
Hi, maybe not the accurate information, but I have the same bad compiling performance. I'm using the VSCode extension Code Runner, as far as I know, it simply runs the two command lines. For example: And it's more painful when using (My computer is a bit out of date and slow...) As is seen, 12.2.0 compiles approximately 2x slower then 11.2.0, and when tested on Command Prompt and PowerShell, the result is the same. Could someone tell me why the compiling is so slow? Thanks! |
Since GCC 12 there is issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105858 which breaks precompiled headers and which for now requires GCC12 to be built without precompiled headers. This is likely to have some performance impact. Maybe this is what you are experiencing? |
Ah, thanks for replying! Maybe that's the reason. |
I noticed that the GCC developers have no interest in fixing bugs on Windows platform. They don't even consider patches sent. clang/LLVM developers show fundamental difference. Perhaps, migration to clang/LLVM will relieve one's migraine. |
I too have logged issues with GCC that barely got any response. Though some of them were resolved in the end. LLVM/CLang is a different track, but it's not always an exact drop-in replacement for GCC. But at least with LLVM/CLang Windows on ARM is supported, while GCC doesn't even look like it's working on that either. |
I use C compiler as a means to compile the C code generated by Nim. Since the 12.x.x releases of gcc, I have noticed a huge slowdown compared to the 11.x.x version. With gcc 11.3.0 Nim bootstrap took 3min05s. Already with gcc 12.2.0 it is taking 8min24s. I'm using msvcrt. |
For speed testing purposes I have just made this release (it reverts binutils back to the previous version): Can you try if this version works faster for you? |
I reported a similar issue in #114 - which I subsequently closed because I'm not sure that it's a bug report that should have been filed on this forum. As regards that slowness, I can report that this snapshot makes no appreciable difference at all. However, @brechtsanders, I do thank you for going to the trouble of providing this snapshot. Cheers, |
I tested and got this: 8min44s |
I was able to build the version with precompiled headers enabled. Can you compare speed again? |
This new release took 8min29s I have a table here comparing build times on Nim bootstrap, all using the same conditions. Perhaps by looking at your best performing builds you can determine what else it might be.
|
I tested this gcc 12.2.0 binary (x86_64-12.2.0-release-posix-seh-rt_v10-rev1) and got 3min03s under the same conditions I did the previous tests. |
That build by niXman of 12.2.0 (x86_64-12.2.0-release-posix-seh-rt_v10-rev1) also eradicates the slowness I reported in #114. Cheers, |
A good next step would be to compare outputs of |
I took a look and there are several differences, but for those who do not compile gcc, it is difficult to know what could be causing this slowdown in your release. Winlibs configuration that differs from niXman, either because it does not have a corresponding one or because it is disabled or enabled.:
niXman settings that differs from winlibs, either because it does not have a corresponding one or because it is disabled or enabled:
|
I have tried to patch the PCH issue according to MSYS2's patches. |
@brechtsanders unfortunately it didn't solve the speed problem. |
12.2 feels a lot faster, and it seems like PCH is working too Thank you for the release 🍓 |
@term-est Are you specifically referring to yesterday's build? I also had the impression it was working smoother. But that's just a gut feeling, maybe other things were at play too. |
I downloaded and tested release 4, but the compile time remains the same. That is, it remains 2.5x slower than the one distributed by niXman. |
@brechtsanders I recently tested |
I'm not sure what caused it. |
(Latest build)
MSVCRT works as expected.
The text was updated successfully, but these errors were encountered: