LLVM 12 for Windows on Arm - Does it Create Fast Code?

  Переглядів 8,348

Gary Explains

Gary Explains

День тому

Until now the best compiler for Windows on Arm was Microsoft's own Visual Studio C/C++ compiler. However LLVM 12 has now been released with native support for Windows on Arm. Here is a quick overview of LLVM & Clang 12 for Windows 10 on Arm.
Use Clang on Windows, Linux, and macOS: • Use Clang on Windows, ...
Subleq video: • A CPU With Just One In...
Linux is faster than Windows - Is it the compiler?: • Linux is faster than W...
My GitHub repo: github.com/garyexplains/examples
Compiler Test: github.com/garyexplains/examp...
Introduction to Android app development: www.dgitacademy.com
Let Me Explain T-shirt: teespring.com/gary-explains-l...
Twitter: / garyexplains
Instagram: / garyexplains
#garyexplains

КОМЕНТАРІ: 52
@harshivpatel6238
@harshivpatel6238 2 роки тому
Dang! I'm getting addicted to these!
@avejst
@avejst 2 роки тому
Intersting subject Thanks for sharing :-)
@hermanstokbrood
@hermanstokbrood 2 роки тому
Always interesting to see the difference between compilers. The main question is: how much will it affect your program and the user experience in general. Another big question (for me) is: how fast are the compilers not only running the binary but also building the binary.
@floppa9415
@floppa9415 2 роки тому
Neat, I just find it fascinating that Android solved all these Problems years ago.
@tomswan3401
@tomswan3401 2 роки тому
Java?
@Shvmadogg
@Shvmadogg 2 роки тому
The beginning of the end for x86
@juzujuzu4555
@juzujuzu4555 2 роки тому
Please test GCC 11.1 that just came up. Though I would appreciate if you would test both latest GCC 10 and GCC 11, would be really interesting to see the difference, with Ofast option because certain versions seem to change the default optimizations on O2 and O3 levels.
@GauthamKrishna9991
@GauthamKrishna9991 2 роки тому
Ofast is kinda a forbidden option which removes ALL guard-rails and sacrifices everything for pure performance. It's not recommended to use Ofast, which is why almost every build system using C/C++ uses -O3 for release software.
@obinator9065
@obinator9065 2 роки тому
@@GauthamKrishna9991 -O2. -O3 optimization can be too aggressive too.
@juzujuzu4555
@juzujuzu4555 2 роки тому
@@GauthamKrishna9991 Sure a lot of things should not use Ofast, but here it makes sense. Unless the software doesn't work or if the results are weird.
@Winnetou17
@Winnetou17 2 роки тому
@@juzujuzu4555 Shouldn't it be safe to run, if it's compiled and run on the same machine ?
@GauthamKrishna9991
@GauthamKrishna9991 2 роки тому
@@obinator9065 You're right, but unless it's for absolute performance, the notion of using O2 or O3 optimization also doesn't make sense in a software context also. You can write a small for-loop in C++ with constant limits and predictable control flow regardless of the other conditions but you can't blame the compiler for unrolling said loop when you're trying to specifically get that edge-case where the unrolling won't work in that specific case. For almost 99% of cases where one needs performance, it's much much easier to let the compiler do the optimization rather than rely on non-standard programming tactics to do it, which is when quite a lot of these discrepancies also arise (I've seen a few of them too, most of them, it was a real shit-show of a code, which also breaks compatibility too).
@LeilfFalkenstrom
@LeilfFalkenstrom 2 роки тому
Interesting video. Sorry if this is a stupid question but was this about compile time only? Where there any difference between how well the compiler optimised the code? Any difference in size on the output? I guess that there may be difference in how good they are on different system optimisation? I ony use gcc from cmd line and only a biginner on this
@GaryExplains
@GaryExplains 2 роки тому
No, this is about the performance of the resulting binary. Does it create fast code, not does it create code fast!
@LeilfFalkenstrom
@LeilfFalkenstrom 2 роки тому
@@GaryExplains for those who do a lot of compiling will apriciate fast compiling but I think that result of well optimised output is most important.
@jimmygervaisnet
@jimmygervaisnet 2 роки тому
FreeBasic can compile for ARM v8. I have yet to try it, but I don't have an Arm based Windows device.
@GaryExplains
@GaryExplains 2 роки тому
Oh, that is interesting, I will give that a try when I have some free time.👍
@imerence6290
@imerence6290 2 роки тому
And what about ACO ?
@abhishekgautam5015
@abhishekgautam5015 2 роки тому
I know it sounds more of a ltt project but can we pass through thunderbolt enclosed gpu into a VM in m1 macs🙄
@unclefunctor8891
@unclefunctor8891 2 роки тому
Wow, didn't ARM team up with GNU? So it's kind of embarrassing for them to be beat by MS.... LoL Great video, Thanks.
@callumvanheerden1530
@callumvanheerden1530 2 роки тому
Cool
@flexiorange3048
@flexiorange3048 2 роки тому
Can you compile code for x86 on arm?
@GaryExplains
@GaryExplains 2 роки тому
Yes.
@tomswan3401
@tomswan3401 2 роки тому
Probably it also depends on the dependencies that code has.
@axelkoster
@axelkoster 2 роки тому
When will AI get involved to optimize code?
@dariuselijah9277
@dariuselijah9277 2 роки тому
Check out Github Copilot
@fallinginthed33p
@fallinginthed33p 2 роки тому
First time I've seen anyone on UKposts cover this. A lot of smaller open source projects work fine with Arm's clang dropped into Visual Studio. The putty developer uses this. The MS compiler runs under x86 emulation on Windows on ARM so it's not fast. I think only gcc and ARM clang run natively. I'm surprised why MSVC is so fast compared to the native compilers.
@N....
@N.... 2 роки тому
The benchmarks compare the generated ARM code, not the speed of compilation. So while MSVC running through x86 emulation may take longer to compile, the native ARM code it generates runs faster.
@fallinginthed33p
@fallinginthed33p 2 роки тому
@@N.... Makes sense, MSVC is tuned for Windows and Win on ARM. I'd like to see a compile time comparison too, ARM clang is supposed take half the time compared to MSVC. No idea about WSL gcc.
@erikreider
@erikreider 2 роки тому
Why didn't you run Linux natively?
@GaryExplains
@GaryExplains 2 роки тому
Because a) I don't know of a way to install Linux on the Surface Pro X b) I don't want to install Linux on the Surface Pro X c) the video is about LLVM on Windows 10 for Arm, the use of GCC/WSL was for context.
@erikreider
@erikreider 2 роки тому
@@GaryExplains Cool. Thanks for clarifying 😃
@tomswan3401
@tomswan3401 2 роки тому
Linux virtualization on surface pro x? Or some linux on cloud/aws/azure ?
@erikreider
@erikreider 2 роки тому
@@tomswan3401 you should be able to install Linux on the device so no virtualization
@jimmysanders505
@jimmysanders505 2 роки тому
​@@erikreider You can't in any capacity that's usable for writing software, or in any capacity you'd want to use as a consumer device. No wifi. No stable NVME. No stylus. No LTE. Maybe in another year most of this stuff will be fixed. The SPX is in an even worse position than the other WoA devices since you don't only have to deal with Qualcomm's garbage, you have to deal with additional Microsoft HW features.
@synonys
@synonys 2 роки тому
Clang was consistent… consistently slow
@krtirtho
@krtirtho 2 роки тому
CC? Subtitles? Subtítulos? 字幕?উপশিরোনাম?
@nasserazad8866
@nasserazad8866 2 роки тому
so, you are vinod?
@Phynix72
@Phynix72 2 роки тому
About Windows on ARM, it will always be sluggish until & unless Microsoft pushes their enginner & devs to build kernel from scratch line by line & build the it all again with environment's flexiblity as primary goal. Afterwards they have to take care application & program space, how devs can build & port them easily. ARM is designed for low power & less resource intensive workload, whether Windows is always resource hog & its applications rely on packages & customisations.
@vapourmile
@vapourmile 2 роки тому
These intros would be so much better without the cringe catchphrase, "please let me explain".
@GaryExplains
@GaryExplains 2 роки тому
Personally I think the comments section would be better without cringe comments, like yours, but we each have our own opinion. 😜
Arm vs RISC V- What You Need to Know
22:19
Gary Explains
Переглядів 294 тис.
Я бы Не Прыгнул Туда и За 100 Миллионов 😭
00:20
Глеб Рандалайнен
Переглядів 17 млн
Гражданская оборона 2024 - 12 полный выпуск
1:00:39
Телеканал ICTV
Переглядів 350 тис.
If You’re Tired of MacBooks Winning…
7:23
Dave2D
Переглядів 540 тис.
LLVM in 100 Seconds
2:36
Fireship
Переглядів 796 тис.
A Brief Introduction to LLVM
20:28
Morgan Wilde
Переглядів 70 тис.
Snapdragon 8s Gen 3 vs Snapdragon 8 Gen 3
7:46
Gary Explains
Переглядів 775
Arm vs x86 - Key Differences Explained
20:38
Gary Explains
Переглядів 369 тис.
The Biggest Upgrade for Windows PCs in YEARS - Snapdragon X Elite
7:39
Austin Evans
Переглядів 273 тис.
Comparing ARM vs RISC-V vs x86_64 with GCC vs Clang
27:16
The [Fill in the Blank] Programmer
Переглядів 9 тис.
Understanding Mesh Networking (feat. MikroTik Audience)
17:12
Gary Explains
Переглядів 53 тис.
How To Use VS CODE for C++ | With CMake & Any Compiler
9:14
Code, Tech, and Tutorials
Переглядів 63 тис.
Я бы Не Прыгнул Туда и За 100 Миллионов 😭
00:20
Глеб Рандалайнен
Переглядів 17 млн