a (much) faster c++ compiler

67 views
Skip to first unread message

Alp Kucukelbir

unread,
May 23, 2015, 9:54:25 AM5/23/15
to stan...@googlegroups.com
hi all,

i know next to nothing about compilers.

but this came up on my feed today: http://www.zapcc.com/

i thought i'd share.

cheers
alp

Ido Rosen

unread,
May 23, 2015, 10:26:45 AM5/23/15
to stan...@googlegroups.com
It looks like it precompiles headers and/or TU/CUs? If you've tried
it zapcc, how does it compare to using ccache, which has existed for
longer and is free?

Either way, the "faster" part advertised on that site seems to be the
compilation time, not the runtime, which for Stan users is probably
not as important as execution/runtime speed...

Speaking of compilers and runtime speed, has anyone tried building
Stan using the Intel compiler suite (ICPC)[0], or using ICL (Clang++
frontend, Intel compiler backend[1])? (It's not free, but I'm pretty
sure Columbia has a license for it somewhere.)

[0] https://software.intel.com/en-us/c-compilers
[1] http://llvm.org/devmtg/2014-04/PDFs/Posters/ClangIntel.pdf
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ben Goodrich

unread,
May 23, 2015, 12:46:16 PM5/23/15
to stan...@googlegroups.com, iro...@gmail.com
On Saturday, May 23, 2015 at 10:26:45 AM UTC-4, Ido Rosen wrote:
It looks like it precompiles headers and/or TU/CUs?  If you've tried
it zapcc, how does it compare to using ccache, which has existed for
longer and is free?

Stan's unit tests have historically not worked great with ccache because the -M resulted in a lot of ccache misses. This might be worth buying for Jenkins / Yeti once it is released, although I am surprised that they claim to have Windows support when clang++ does not yet claim to have full Windows support.
 
Speaking of compilers and runtime speed, has anyone tried building
Stan using the Intel compiler suite (ICPC)[0], or using ICL (Clang++
frontend, Intel compiler backend[1])?  (It's not free, but I'm pretty
sure Columbia has a license for it somewhere.)

A long time ago and it didn't result in much execution time saved (then) because almost all the Intel optimizations are for doubles rather than custom types.

Ben


Bob Carpenter

unread,
May 23, 2015, 1:43:15 PM5/23/15
to stan...@googlegroups.com

> On May 23, 2015, at 12:46 PM, Ben Goodrich <goodri...@gmail.com> wrote:
>
> On Saturday, May 23, 2015 at 10:26:45 AM UTC-4, Ido Rosen wrote:
> It looks like it precompiles headers and/or TU/CUs? If you've tried
> it zapcc, how does it compare to using ccache, which has existed for
> longer and is free?
>
> Stan's unit tests have historically not worked great with ccache because the -M resulted in a lot of ccache misses. This might be worth buying for Jenkins / Yeti once it is released, although I am surprised that they claim to have Windows support when clang++ does not yet claim to have full Windows support.

I'd never heard of ccache, but something that would speed up model
compilation times would be awesome. I saw on the ccache page:

* Only knows how to cache the compilation of a single C/C++/Objective-C/Objective-C++ file.
Other types of compilations (multi-file compilation, linking, etc) will silently fall back
to running the real compiler.

> Speaking of compilers and runtime speed, has anyone tried building
> Stan using the Intel compiler suite (ICPC)[0], or using ICL (Clang++
> frontend, Intel compiler backend[1])? (It's not free, but I'm pretty
> sure Columbia has a license for it somewhere.)
>
> A long time ago and it didn't result in much execution time saved (then) because almost all the Intel optimizations are for doubles rather than custom types.

It might be better now that we offload more to
the matrix libs as pure double operations. We'll probably
be doing much more of this going forward, too.

- Bob
Reply all
Reply to author
Forward
0 new messages