[gambit-list] Building Gambit on OS X

Marc Feeley feeley at iro.umontreal.ca
Fri Jan 16 14:20:51 EST 2015


> On Jan 16, 2015, at 5:15 AM, Álvaro Castro-Castilla <alvaro.castro.castilla at gmail.com> wrote:
> 
> On Wed, Jan 14, 2015 at 8:21 PM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
> Xcode 6.1.1 was released a little over a month ago, so I decided to do some benchmarking to see how well its C compilers (Apple clang 6.0 and Apple gcc 6.0) compare against GNU gcc 4.9.2 when compiling Gambit.
> 
> I configured and built Gambit with
> 
>    ./configure --enable-single-host CC="<C_COMPILER>"
>    make -j8
> 
> I report the build time for each compiler and the execution time of test 4 (which measures the speed of the interpreter, which is indicative of the relative speed of the code generated by Gambit).  Here are the numbers:
> 
>   Build          test4         C compiler
>   (secs)         (secs)
> 
>     60.31        1.30          GNU gcc 4.9.2
>   2042.98 (34x)  3.05 (2.3x)   Apple clang 6.0
>   1875.56 (31x)  3.08 (2.4x)   Apple gcc 6.0
> 
> 
> Thank you for the benchmarks, Marc. It seems that GCC still greatly outperforms Apple's GCC/Clang with Gambit code. Do you have any idea if it is a particular optimization that is producing this divergence, or is just the accumulation of small differences?

My guess is that clang is using optimizations of high computational complexity, and the development team does not do performance testing on programs with very large C functions.  I remember that some old versions of GNU gcc (version 3.2?) also had slow compile times for Gambit, but not as dramatic as with clang which is 30x slower.  Fortunately, Brad Lucier was in contact with the GNU gcc development team and put in the effort to pinpoint the origin of the problem and eventually fix the issue.  Someone with contacts on the LLVM development team should do that for clang!

Marc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4839 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150116/3ef4c11c/attachment.bin>


More information about the Gambit-list mailing list