Subject: Re: [boost] Phoenix v3 review
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-02-25 09:54:03
On 25/02/2011 13:35, Joel de Guzman wrote:
> Exactly. Phoenix functions are not proto terminals. I agree with
> Thomas, I'd like to see the numbers first before jumping to a conclusion.
The attached example tries to demonstrate the difference using a
simplistic "function" definition that merely forwards to the wrapped PFO.
I've only considered unary functions for simplicity.
I ran the tests with GCC 4.5 with -O3.
On my platform, for 4096 functions, using global objects compiles in 7
seconds, while using free functions compiles in 550 ms.
The size overhead is fairly minimal, 992 bytes for the global version
and 643 for the function version.
Now, if I change function to be a POD, both tests end up with an object
size of 644 bytes, and the compile time of the global version gets down
to 650 ms, making it almost as good as the free function case.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk