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

Re: [amibroker] Re: NOT REALLY A BUG



PureBytes Links

Trading Reference Links

Tomasz,

> These are basic things covered in each and every book on
> programming (i.e. they are language-independent, because
> these are 'universal' programing rules not depending on
> particular language).

Iım guessing you are just responding to Dimitris who is certainly an expert
user, if not a trained programmer, but I suspect the majority of your users
are not trained programmers. Certainly the majority of POTENTIAL users are
not programmers. 
> 
>> > 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.
> 
So maybe this idea is a good one. On the other hand most users probably
donıt even WANT to know this level of detail ;-)
-- 
Terry


From: "Tomasz Janeczko" <amibroker@xxxxxx>
Reply-To: amibroker@xxxxxxxxxxxxxxx
Date: Fri, 1 Oct 2004 09:01:27 +0200
To: <amibroker@xxxxxxxxxxxxxxx>
Subject: Re: [amibroker] Re: NOT REALLY A BUG

Dimitris,

The example was intented to show that implementation of AFL language
contructs
(like loops) is very, very fast.
So using loops is not a problem at all.

Problems may start when _the_ _formula_ _you_ _put_ _inside_ the loop
is written in inefficient manner.
I already wrote about some basic techniques like moving invariants
out of loop plus using variables and calling functions once instead
of repetitive calling the same functions with same params over and over
again. 
If such inefficient code is wrapped inside several nested loops it will
execute slowly no matter in what language is written. Even if you wrote it
in assembler (straight machine CPU code)

These are basic things covered in each and every
book on programming (i.e. they are language-independent, because
these are 'universal' programing rules not depending on particular
language).

But thank you for your suggestion - I will think about writing some article
about good programming practices in next newsletter.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, October 01, 2004 8:01 AM
Subject: [amibroker] Re: NOT REALLY A BUG


> 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]
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
>


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

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Yahoo! Groups Sponsor
 
 ADVERTISEMENT
 <http://us.ard.yahoo.com/SIG=129nno4dn/M=298184.5285298.6392945.3001176/D=g
roups/S=1705632198:HM/EXP=1096700513/A=2368837/R=0/SIG=11tdf3rom/*http://www
.netflix.com/Default?mqso=60185370&partid=5285298 >


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
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
*  
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[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/