Binary Compilation – Compiling vs Using Pre-Built Binaries Performance

binarycompilation

Will performance be better (quicker) if I manually compile the source for a software component for the actual machine that it will be used on, compared to if the source was compiled on another platform perhaps for many different architectures? I got some good results compiling source that I downloaded and I wonder whether this was due to compiling it instead of downloading a pre-compiled binary which is often the case with software updates.

Best Answer

In many (if not most) cases, yes. This because the compiler can produce native code optimized for that particular CPU and environment. The code is more "targeted".

Related Topic