[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: NOT REALLY A BUG



PureBytes Links

Trading Reference Links

Tomasz,
Your example is a bit strange. AFL does not need 5sec for 10 million 
iterations, it is not a global measure, the total time depends 
strongly on the code. It will not be 5 sec if we use an MA instead of 
the sin function, it will be 5min and the total time will be much 
longer if a Plot statement is added inside the loop.
It would help to write some basic "rules" for the execution time of 
AFL loops [perhaps in some next newsletter] and some instructions how 
to "optimize" AFL loops.
Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Hello,
> 
> You should optimize your formula first so it does not ages to 
execute.
> 
> If your formula takes more than 1 second to execute you probably
> did something very weird or wrong because AFL itself including 
loops are hyper fast.
> 
> For example TEN million iteration of sine function like this:
> for(i=0;i<10000000;i++)
> {
>  x = sin(i);
> }
> 
> Takes only five seconds, so it takes 0.5 microsecond per iteration 
(including calculation
> of trigonometric function).
> 
> (Note that if you want to try this code you would need to adjust 
the endless loop detection
> threshold level in Tools->Preferences->AFL to more than 10 million 
loops, otherwise you will
> get endless loop warning).
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> 
> ----- Original Message ----- 
> From: "s.carrasset" <s.carrasset@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, September 30, 2004 3:55 PM
> Subject: [amibroker] NOT REALLY A BUG
> 
> 
> > hello, Tomasz.
> > 
> > it can happens ( rarely ^_^) that I get a "displeasure" with 
amibroker.
> > where can I send it , here or support?
> > for ex the last one:
> > 
> > if I write or paste a code with many loops  (with no error 
inside)  like 
> > the last one parabolic code of  Dimitri in message 71077.
> > 
> > Amibroker becomes very slow to open the symbol workspace even if 
i close 
> > the code's window on the  displayed  chart pane.
> > 
> > stephane
> > 
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> >
> 
> [Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/