Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22006

Compiling C code is drastically slower since macOS Sierra on MacBook Pro 2015

$
0
0

Since macOS Sierra, compiling C code with clang or gcc is really, really slow.
Reinstalling El Capitan (even today) solves the issue.
Building on GNU/Linux is much faster.
Building on Windows AND on WSL is also much faster.

By slower, I mean twice (or more) the time to build a simple C project. (from 5-6 seconds to 15 seconds)

I am not sure about what to do, have anybody ecountered this ?

Moreover, the whole system is really slower and sluggish since Sierra, I really think that it is a macOS issue. Other OSes are still fast.

If anybody needs more specific data, do not hesitate.
Many thanks for your help !


EDIT 1 : I need macOS for the iOS/tvOS toolchain, therefore I cannot switch.
I also kind of want to use this OS for its apps and environment.

I tried GCC 9, clang 10.


I use make -j5 with a makefile calling gcc/clang -Wall -Werror -Wextra -c file.c
You can see this dummy repo edrflt/build_speed

On macOS, I get :

make -j5  13,95s user 10,55s system 298% cpu 8,204 totalmake -j5  16,91s user 12,81s system 252% cpu 11,752 totalmake -j5  14,05s user 10,81s system 295% cpu 8,412 total

On Ubuntu 20.04, I get :

make -j5  10,15s user 4,69s system 361% cpu 4,111 totalmake -j5  10,13s user 4,74s system 357% cpu 4,162 totalmake -j5  10,27s user 4,54s system 359% cpu 4,119 total

EDIT 2 : I also did some tests with the latest tcc (0.9.27), built from source :
macOS :

make -j5   6,01s user 3,35s system 193% cpu 4,827 total

Ubuntu :

make -j5   0,94s user 0,53s system 342% cpu 0,428 total

(yes it is really under one second)

Tests with el capitan are coming...


Viewing all articles
Browse latest Browse all 22006

Trending Articles