Subject: [boost] [phoenix] compile-time performance
From: Eric Niebler (eric_at_[hidden])
Date: 2011-09-12 14:54:43
On 9/12/2011 4:06 AM, Thomas Heller wrote:
> On Monday, September 12, 2011 02:57:21 PM Joel de Guzman wrote:
>> For example, here is the current CT status of Phoenix2 vs Phoenix3
>> comparing the elapsed (CT) time for the phoenix2 vs. phoenix3
>> lambda_tests.cpp (**):
>> MSVC 10:
>> Phoenix2: 00:04.5
>> Phoenix3: 00:29.9
>> G++ 4.5:
>> Phoenix2: 00:02.6
>> Phoenix3: 00:04.7
> I wasn't aware that Phoenix3 was so bad under MSVC 10.
Me neither. If that's the case, we have work to do.
>> You all know that Phoenix2 uses Fusion exclusively. Phoenix3 uses
>> proto, which according to Eric does not use Fusion, although IIRC
>> the core of Phoenix3 uses some Fusion still (quick check: Thomas
>> uses an optimized-PP version of fusion:: vector for phoenix3).
>> Heller did a helluva perf-tweaks for Phx3 to get that number for
>> g++ (alas, not MSVC). In fairness, I did absolutely no CT
>> perf-tweaks for both Phoenix2 and Fusion.
>> (** I made sure both tests have exactly the same code, so I removed
>> the last test. I can post the exact code if need be)
OK, I retract everything I said. Fusion rulez, and Proto needs help.
Sorry for the blind accusation. Let's stop this and figure out what
needs to be fixed.
> FWIW, there are some unit tests that outperform the compile times of
> Phoenix2 (with gcc), the current bad hit on compile times seem to
> only occur with let, lambda and switch/case expressions.
This /suggests/ to me that the core of Phx3 is sound, but that the
implementation of let, lambda, and switch are heavy. But I'm not blaming
Thomas. I'm just suggesting a logical place to begin an
And regardless, we should point Steven's template profiler at the code
and see what it says. Thomas, do you want to give that a shot?
-- Eric Niebler BoostPro Computing http://www.boostpro.com