Re: [proto] proto performance

2011-02-24 Thread Karsten Ahnert
> MacBook Pro, 10.6.6, Core 2 Duo > ProtoContext ProtoTransform > ProtoLambda Loop > GCC 4.2.1 (Apple) : 5.3565438 5.3721942 > 126.38458 1.3657978 > GCC 4.4.5 : 1.8878364

Re: [proto] proto performance

2011-02-24 Thread Nate Knight
Not sure what happened to those tables. I'll try again. MacBook Pro, 10.6.6, Core 2 Duo ProtoContextProtoTransform ProtoLambda Loop GCC 4.2.1 (Apple) : 5.3565438 5.3721942 126.38458 1.3657978 GCC 4.4.5 : 1.8878364 1.8845548

Re: [proto] proto performance

2011-02-24 Thread Nate Knight
On Feb 20, 2011, at 4:43 AM, Joel Falcou wrote: > On 20/02/11 12:41, Eric Niebler wrote: >> On 2/20/2011 6:40 PM, Joel Falcou wrote: >>> On 20/02/11 12:31, Karsten Ahnert wrote: It is amazing that the proto expression is faster then the naive one. The compiler must really love the way p

Re: [proto] proto performance

2011-02-20 Thread Joel Falcou
On 20/02/11 12:41, Eric Niebler wrote: On 2/20/2011 6:40 PM, Joel Falcou wrote: On 20/02/11 12:31, Karsten Ahnert wrote: It is amazing that the proto expression is faster then the naive one. The compiler must really love the way proto evaluates an expression. I still dont really know why. Usua

Re: [proto] proto performance

2011-02-20 Thread Eric Niebler
On 2/20/2011 6:40 PM, Joel Falcou wrote: > On 20/02/11 12:31, Karsten Ahnert wrote: >> It is amazing that the proto expression is faster then the naive one. >> The compiler must really love the way proto evaluates an expression. > > I still dont really know why. Usual speed-up in our use cases her

Re: [proto] proto performance

2011-02-20 Thread Joel Falcou
On 20/02/11 12:31, Karsten Ahnert wrote: It is amazing that the proto expression is faster then the naive one. The compiler must really love the way proto evaluates an expression. I still dont really know why. Usual speed-up in our use cases here is like ranging from 10 to 50%.

Re: [proto] proto performance

2011-02-20 Thread Karsten Ahnert
On 02/20/2011 12:08 PM, Joel Falcou wrote: > On 20/02/11 12:03, Karsten Ahnert wrote: >> On 02/20/2011 12:02 PM, Joel Falcou wrote: >>> On 20/02/11 11:55, Karsten Ahnert wrote: On 02/20/2011 11:57 AM, Eric Niebler wrote: It gcc 4.4 on a 64bit machine. Of course, I compile with -O3. >

Re: [proto] proto performance

2011-02-20 Thread Joel Falcou
On 20/02/11 12:03, Karsten Ahnert wrote: On 02/20/2011 12:02 PM, Joel Falcou wrote: On 20/02/11 11:55, Karsten Ahnert wrote: On 02/20/2011 11:57 AM, Eric Niebler wrote: It gcc 4.4 on a 64bit machine. Of course, I compile with -O3. Ding! welcome to gcc-4.4 64bits compiler hellfest. Try 4.5, 4.

Re: [proto] proto performance

2011-02-20 Thread Karsten Ahnert
On 02/20/2011 12:02 PM, Joel Falcou wrote: > On 20/02/11 11:55, Karsten Ahnert wrote: >> On 02/20/2011 11:57 AM, Eric Niebler wrote: >> It gcc 4.4 on a 64bit machine. Of course, I compile with -O3. >> > Ding! welcome to gcc-4.4 64bits compiler hellfest. > Try 4.5, 4.4 64bits can't inlien for w/e re

Re: [proto] proto performance

2011-02-20 Thread Joel Falcou
On 20/02/11 11:55, Karsten Ahnert wrote: On 02/20/2011 11:57 AM, Eric Niebler wrote: It gcc 4.4 on a 64bit machine. Of course, I compile with -O3. Ding! welcome to gcc-4.4 64bits compiler hellfest. Try 4.5, 4.4 64bits can't inlien for w/e reason. ___

Re: [proto] proto performance

2011-02-20 Thread Joel Falcou
On 20/02/11 11:57, Eric Niebler wrote: On 2/20/2011 5:52 PM, Joel Falcou wrote: 1/ how do you measure performances ? Anything which is not the median of 1-5K runs is meaningless. You can see how he measures it in the code he posted. I clicked send too fast :p 2/ Don't use context, transform

Re: [proto] proto performance

2011-02-20 Thread Karsten Ahnert
On 02/20/2011 11:57 AM, Eric Niebler wrote: > On 2/20/2011 5:52 PM, Joel Falcou wrote: >> 1/ how do you measure performances ? Anything which is not the median of >> 1-5K runs is meaningless. > > You can see how he measures it in the code he posted. > >> 2/ Don't use context, transform are usuall

Re: [proto] proto performance

2011-02-20 Thread Eric Niebler
On 2/20/2011 5:52 PM, Joel Falcou wrote: > 1/ how do you measure performances ? Anything which is not the median of > 1-5K runs is meaningless. You can see how he measures it in the code he posted. > 2/ Don't use context, transform are usually better optimized by compilers That really shouldn't

Re: [proto] proto performance

2011-02-20 Thread Joel Falcou
1/ how do you measure performances ? Anything which is not the median of 1-5K runs is meaningless. 2/ Don't use context, transform are usually better optimized by compilers 3/ are you using gcc on a 64 bits system ? On this configuration a gcc bug prevent proto to be inlined. __

[proto] proto performance

2011-02-20 Thread Karsten Ahnert
Hi, I wrote a tiny linear algebra edsl using proto and std::tr1::array: namespace linear_algebra { const size_t n = 512; typedef std::tr1::array< double , n > state_type; template struct is_terminal : mpl::false_ {}; template<> struct is_terminal< state_type > : mpl::true_ {};