|
|
|
|
|
by eyesee
1837 days ago
|
|
Is there an advantage to compiling native vs non-native code? Certainly during execution I would expect that, but I’m not clear why that would be true for compilation. Agreed that a better benchmark would be compiling for the same target architecture on both. |
|
What can make a difference is the architecture. Examples:
- Register assignment is easier on orthogonal architectures.
- A compiler doesn’t need to spend time looking for auto-vectorization opportunities if the target architecture doesn’t have vector instructions.
Probably more importantly, there can be a difference in how much effort the compiler makes for finding good code. Typically, newer compilers start out with worse code generation that is faster to generate (make it work first, then make it produce good code)
I wouldn’t know whether any of these are an issue in this case.