Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The difference is a matter of both technology and speed.</p> <p>CLANG was still young and buggy when Apple began the transition away from GCC's compiler and toolchain, so LLVM was built as a back-end to GCC to facilitate its eventual replacement. So, code went in and was compiled by GCC into some intermediate form, but was sent to LLVM to provide the final machine code and packaging. </p> <p>Eventually, LLVM and especially CLANG were mature enough to replace GCC outright, which provided an amazing speed boost to compiling and a bump in the quality of the machine code output (though many argue that GCC still produces better quality code at the expense of speed).</p> <p>But to address your concern about game performance: while CLANG may provide a "better" compile experience, performance is not the job of a compiler. While optimization and simplifications are a part of the compile process, the fact that people still write laggy games or produce infinite loops that lay waste to the stack show that <em>performance</em> is your job. The compiler can only do so much, the rest is up to you. The type or vendor of a compiler will also not make or break your game or affect frame rate or usability. You should read about lower-level optimizations for the ARM architecture. A few articles about <a href="http://wanderingcoder.net/2010/07/19/ought-arm/">NEON</a>, and <a href="http://llvm.org/pubs/2010-04-NeustifterProfiling.pdf">instruments</a> would do you a lot more good than learning about "optimizing for the compiler".</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COActually it's the other way around - LLVM-GCC uses the GCC front-end but the LLVM code generators. When the LLVM project started it's goal was to provide only the backend code generators and other compiler infrastructure, but not a complete C compiler. Apple later initiated the clang project to build a full compiler on top of the LLVM infrastructure.
      singulars
    2. COI disagree with 'performance is not the job of a compiler.' Performance is a huge part of what makes a compiler good. Ideally a user should be able to just write readable, maintainable code and rely on the compiler to make it fast. Clang is not the most mature compiler and often shows performance shortcomings compared to other modern compilers. Occasionally it also compares very well, but more often not. Clang's great strength from a user's perspective is in high quality diagnostics and conformance. From a compiler developer's perspective Clang is very easy to work with and moves very rapidly.
      singulars
    3. CO@Sven You are absolutely correct, and I have edited to reflect that. @barnes53: I only said that because while compilers do in fact "optimize", they often don't do anything intrinsic without explicit instructions to do so. A perfect example would be PPC's old `fsel()`, which allowed a function to forgo branching with floating-point returns. The compiler did not know how to fold branches to fsel, you had to tell it to do so. Also, he asked about compilers, not debuggers, so I felt a discussion of LLDB was inappropriate.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload