On 8/15/2010 2:21 PM, Daniel Wallin wrote: > On Sun, Aug 15, 2010 at 4:51 PM, joel falcou <joel.fal...@lri.fr> > wrote: >> So, Thomas and I felt bored or some suhc this afternoon. >> Incidentally, I needed to use Boost::Parameters in NT² but found >> the compile time to be somehow slow. So in a flash of defiance, we >> went to reimplementing a subset of parameters using proto > > So you implemented something significantly slower (3 times on > machine with gcc4.3). Not very surprising; adding complex abstraction > in the implementation rarely makes things faster. > > Here's the Boost.Parameter version, for reference: > > http://gist.github.com/525778
Haha! I admit I was a bit suspicious at first. Nobody ever said, "Wow, Proto sped up my compiles!" ;-) But looking at Joel's implementation, I suspect it can be sped up considerably by avoiding fusion vectors and maps. (I've found fusion to be costly at compile time and generally avoid it in Proto.) I don't see a reason why the proto expression tree can't directly serve the same role as the fusion map. Just define a transform instead of using fusion::at_key. Regardless, a nifty hack, and amazing you could do this in a few hours. -- Eric Niebler BoostPro Computing http://www.boostpro.com _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto