[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Clang and ICC compiler support available for pgreloaded



On, Thu Feb 18, 2010, Rene Dudfield wrote:

> On Thu, Feb 18, 2010 at 8:26 AM, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
> > Hi,
> >
> > starting with SVN revision 2747, pgreloaded adds experimental support
> > for the LLVM Clang C compiler and Intel's C compiler for building the C
> > module extensions.
> >
> > While the ICC support is currently just a simple stub and untested (this
> > will be improved over the next days), the LLVM Clang C compiler (with
> > Clang 2.6.6) was verified to work in different Linux and BSD
> > installations.
> > They do not deal well with the typical Python C and ld flags at the
> > moment, but this will be worked on :-).
> >
> > For those of you, who want to try them out, I strongly recommend to take
> > a look at the LLVM Clang compiler. It's quite fast on compiling and
> > supports a solid GCC ABI compatibility (building Python with GCC
> > and pgreloaded with Clang works pretty well, for example).
> >
> > Regards
> > Marcus
> >
> 
> nice one!
> 
> Have you benchmarked Clang with pgreloaded yet?  Would be interested
> to know how that goes...  I've found Clang to be slower than gcc 4.4.3
> for some things when I tried it on a different project, but faster
> than some old gcc versions (4.1 I think it was).

No idea, personally I do not see, if benchmarking such a small project
makes much sense. It's not like we have a build cluster in use for the
trillion KLOCs ;-).

It feels faster however, compared to my system GCC 4.2 and 4.1. I did not
try it with other GCC versions.

The biggest advantage over GCC is the intermediate code generation,
which makes optimisation and casting issues obvious most of the
time. Another (really, really, really) big plus is the warning and error
mechanism, which sucks often enough for GCC, but is damn charming with
Clang. It took me 10 seconds to find a macro expansion bug, where'd I
have sat for hours with the often confusing GCC warnings.

> Some good competition in open source compilers now!  Both projects
> seem to be getting quite good.
> 
> btw, tinycc is a really quick compiler too.  cinpy

I'll have a look at it and add it as well, if it's not too much
work. Btw., the compiler extension can be easily ported to the pygame
1.x trunk. Take a look at the relevant files (clangccompiler.py,
intelccompiler.py) in config/ as well as the
changed distutilsext.py file (which is mingw32distutils.py in trunk/).

It should take you not more than 5 minutes to add the compilers.

Regards
Marcus

Attachment: pgppzRwgXk5ub.pgp
Description: PGP signature