Boost logo

Boost :

Subject: Re: [boost] Phoenix v3 review
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2011-02-25 01:08:53

On 25/02/11 03:21, Joel de Guzman wrote:
> :-) Mathias has a point. Let's also discuss this off-list. With Spirit,
> I've already begun the migration towards an object free environment,
> but that's for terminals --of which proto is known to slow down
> compilation when there are lots of terminals. I am not quite sure
> about function objects.
I want to point you again tomy boostcon 2k10 talk. we showed figure where
the old nt2, using instance of function object , resulted in a linear
compile time,
while having template function using make_expr get us constant compile time.

Here the post I made way before on the same issue:

The relevant data:

Naked main : 0.05s
Naked main w/ proto : 1.50s => overhead of proto include = 1.45s

Without Call to the actual function:
Main with 1 proto term : 1.52s => overhead = 0.02s = 0.020s/term
Main with 10 proto term : 1.55s => overhead = 0.05s = 0.005s/term
Main with 100 proto term : 1.99s => overhead = 0.49s = 0.005s/term
Main with 150 proto term : 2.55s => overhead = 1.05s = 0.007s/term
Main with 200 proto term : 3.48s => overhead = 1.98s = 0.009S/term
Main with 256 proto term : 4.80s => overhead = 3.30s = 0.013s/term

Main with 1 proto func : 1.52s => overhead = 0.02s for one function =
Main with 10 proto func : 1.53s => overhead = 0.03s for one function =
Main with 100 proto func : 1.53s => overhead = 0.03s for one function =
Main with 150 proto func : 1.55s => overhead = 0.05s for one function =
Main with 200 proto func : 1.57s => overhead = 0.05s for one function =
Main with 256 proto func : 1.61s => overhead = 0.09s for one function =

With Call to the defined functions in sequence :
func behaves like term without call (aka compilation time between 1.5s
and 4.8s) term behaves like term without call with a linear overhead of
0.017s/call (aka compilation time between 4.5s and 9.1s)

Other measures :
executable size skyrocket with term even without any functions being
256 functions instanciated yields a 7.3kb binary vs a 1.4kb binary for
make_expr func so an overhead of 23,6 bytes/functions in the case of
terminal object

Boost list run by bdawes at, gregod at, cpdaniel at, john at