Re:2020 Mac Mini – Putting Apple Silicon M1 To The Test
by throwaway894345 on Tuesday November 17, 2020 @02:17PM
(#25128312)
As someone who knows relatively little about this, I'm very curious why this is downvoted. It seems like a rebuttal would be enlightening.
Re:2020 Mac Mini – Putting Apple Silicon M1 To The Test
by marmaduke on Tuesday November 17, 2020 @05:02PM
(#25130549)
Hm my experience was that compiling C on arm was always super fast compared to x86, because the latter had much more work to do.
Re:2020 Mac Mini – Putting Apple Silicon M1 To The Test
by mlyle on Tuesday November 17, 2020 @05:22PM
(#25130709)
This doesn't align with my experience. Clang is about the same, but GCC often seems much slower emitting cross-ARM code.
jar% time x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 0.97s user 0.02s system 99% cpu 0.992 total
jar% time x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 0.93s user 0.03s system 99% cpu 0.965 total
jar% time x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 0.94s user 0.01s system 99% cpu 0.947 total
jar% time x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
x86_64-linux-gnu-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 0.92s user 0.04s system 99% cpu 0.955 total
jar% time arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 1.43s user 0.03s system 99% cpu 1.458 total
jar% time arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 1.46s user 0.03s system 99% cpu 1.486 total
jar% time arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 1.55s user 0.04s system 99% cpu 1.587 total
jar% time arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I ../../shared/api
arm-linux-gnueabihf-gcc --std=c99 -O3 -c insgps14state.c -I inc -I 1.44s user 0.03s system 99% cpu 1.471 total
It's worth noting that cross-compiling is definitely harder in many ways, because you can't always evaluate constant expressions easily at compile-time in the same way your runtime code will, etc, too, and have to jump through hoops.