On 22/02/2009, at 7:51 PM, Erick Tryzelaar wrote:

> On Sat, Feb 21, 2009 at 9:46 PM, john skaller
> <skal...@users.sourceforge.net> wrote:
>> Check generated code to see if the usage of these is inlined.
>> Also check if the nested procedures slow things down.
>> No stack frames should be created: loop_ is tail  rec.
>
> Yep, it was completely inlined and turned into a bunch of gotos. I
> don't really see anything obvious. The algorithm itself is pretty
> straightforward. I'm not sure if there's really that much we could do
> to that g++ isn't able to do. Here's what was generated. Can you see
> anything missing?


>
>      bailout = 4.0;
> /*Eager inline call to loop_<5210>*/
>      zi = 0.0;
>      zr = 0.0;
>      i = 1;
>    _6468:;
> /*Lazy inline call to le<1333>*/
> /*Lazy inline call to gt<1327>*/
> /*begin match*/
> /*match case 1:|case 1*/
>      if(!(!(PTF max_iterations < i ) ==1) ) goto _6470;
> /*begin match*/
> /*match case 1:zr2*/
>      zr2 = zr * zr ;
> /*begin match*/
> /*match case 1:zi2*/
>      zi2 = zi * zi ;
> /*Lazy inline call to le<1333>*/
> /*Lazy inline call to gt<1327>*/
> /*begin match*/
> /*match case 1:|case 1*/
>      if(!(!(bailout < zi2 + zr2  ) ==1) ) goto _6469;


This would be faster if bailout was a macro which was replaced
by 4.0. But not by much ..


> /*parallel assignment*/
>      zi = zr * zi  * 2.0  + (static_cast<double>(x)) / 40.0  ;
>      i = i + 1 ;
>      zr = zr2 - zi2  + ((static_cast<double>(y)) / 40.0  - 0.5 ) ;
>      goto _6468;


--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to