Subject: Re: [boost] BOOST_NO_CXX11_CONSTEXPR and msvc-14.0
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-07-24 14:46:03
On 24.07.2015 19:45, Niall Douglas wrote:
> On 23 Jul 2015 at 14:15, Glen Fernandes wrote:
>> This sounds almost dangerous - like commending a criminal for having a
>> unique interpretation of the law. :-) I thought we prefer compilers to have
>> a correct interpretation of the standard.
> Microsoft can read a standard just as well as anyone, and that's
> exactly where the value add comes from - the same text means
> different thing to different people. Correctness is relative.
> Imagine a world with just clang and GCC. Firstly, clang would utterly
> destroy GCC in short order as it's so much easier to modify and
> evolve, so then it would be just clang. Then there would no longer be
> much need for a C++ standard at all, because whatever clang does IS
> the standard.
Competition is good, on that I agree with you. But I don't think MSVC is
the compiler that drives the competition currently. If anything, this
compiler, being the main compiler on Windows, has been an absolute
embarrassment in terms of language support for many years. It still is
in several areas, even though it's catching up and VS2015 claims to
support C++11 and C++14 more fully. As for clang, I've surely been
hearing that it is about to conquer the world for the last several years
but I don't see that happening. I don't think it would even in the
absence of MSVC.
All that does not diminish the efforts of each dev team. I'm pleased to
see that MS is trying to improve their compiler at a faster pace and
with more frequent releases.
>>> It's vastly faster to compile, like 5x-10x faster as it's not an AST based
>>> compiler like clang and GCC.
>> This is interesting. Which (preferably public-available open source)
>> project(s) have you compiled with all three, and what were the build times?
> It depends on if you use precompiled headers or not. I would assume
> anyone sane in Boost-land does.
I didn't research this but my impression has always been that
precompiled headers mostly hide the slowness of the Windows filesystem.
When I was building natively on Windows, I noticed that the same code
compiled with MinGW on Windows much more slowly than with gcc on Linux,
on the same machine.
> ldtimes for some empirical numbers. tl;dr about 2x faster in debug
> than clang, about 3x faster in release than clang. clang itself is 2x
> faster than GCC in debug.
> AFIO is very easy on the compiler as it's a tiny simple library. The
> more templates you feed it, the relatively faster MSVC becomes
> because it doesn't do two phase lookup i.e. it completely ignores
> template code until instantiation and neither clang nor GCC do that.
I can't see how a non-conforming behavior is an advantage.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk