PureBytes Links
Trading Reference Links
|
Hello,
The answer is simple:
SEND THE CODE you have problems with.
Otherwise the discussion is pointless.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "js8765" <js8765@xxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, May 12, 2008 12:22 AM
Subject: Re: [amibroker] How To Restore Formula Speed?
> How do you call a function once using AFL?
>
> If I look at the section "Understanding how AFL works" that is always
> quoted whenever anyone has questions about the hard to grasp array
> processing language, I can't see anything about how to call a function
> once...
>
> Thanks for any help.
>
> P.S. Tomasz, everything is always easy when you know how. What maybe is
> a bit more difficult is to put yourself in the position of others who
> are still learning and understand that it is not so easy...
>
> Tomasz Janeczko wrote:
>> Percentile involves sorting, it is currently implemented
>> using absolutely the fastest algorithm known to human kind.
>>
>> What you can do to speed it up - that's easy - call it once
>> and store result.
>> This (calling same functions with same arguments many times instead calling it once)
>> is the most common mistake people are making.
>>
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message -----
>> From: Louis Préfontaine
>> To: amibroker@xxxxxxxxxxxxxxx
>> Sent: Sunday, May 11, 2008 4:15 PM
>> Subject: Re: [amibroker] How To Restore Formula Speed?
>>
>>
>> Hi Tomasz,
>>
>> Is there a way to speed up Percentile function?
>>
>> Thanks,
>>
>> Louis
>>
>>
>> 2008/5/11 Tomasz Janeczko <groups@xxxxxxxxxxxxx>:
>>
>> Hello,
>>
>> Use
>> AFL Editor,
>> Tools->Check and Profile
>> to find the bottleneck in your code.
>>
>> Most often people are
>> calling the same funciton over and over many times when
>> they should call it ONCE and store the result in variable.
>> This the most basic improvement can be applied to 99% of
>> formulas written and posted here to get a lot more speed.
>> The other thing is that you move all array function calls OUTSIDE
>> loops. That's second principle: *never* call array function
>> inside loop , unless you are doing something like iterating
>> through multiple symbols. But NEVER call array funcitons
>> inside per-bar loop.
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>>
>>
>> ----- Original Message -----
>> From: "ondrej.uhlarik" <ona@xxxxxxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Sunday, May 11, 2008 2:44 PM
>> Subject: [amibroker] How To Restore Formula Speed?
>>
>> > Hello,
>> > I have programed quite a complicated indicator in AFL. When I load it
>> > in a pane it significantly slows down scrolling speed and reaction
>> > speed in general. That I find very annoying, so I made a Toggle
>> > parameter to switch between 2 modes: Basic (which does not show so much
>> > but does not affect speed so much either) and Advanced (which shows
>> > everything and affects speed a lot). Now the problem is as follows:
>> > I insert the indicator in a pane in the Basic mode and the speed is ok.
>> > Then I switch to the Advanced mode and the speed gets worse. Then I
>> > switch back to the Basic mode but the speed remains bad, i.e. the
>> > original speed is not restored. It seems that the Advanced data are
>> > still loaded in some memory cache and affect speed of the indicator
>> > even if I switch back to the Basic mode. Is there any chance to clear
>> > or reset the data loaded in memory (or whatever) without removing the
>> > indicator from the pane and re-inserting it back?
>> > Thank you for your ideas, and please keep in mind that I am a beginner
>> > in programing :)
>> >
>> >
>>
>> > ------------------------------------
>>
>> >
>> > Please note that this group is for discussion between users only.
>> >
>> > To get support from AmiBroker please send an e-mail directly to
>> > SUPPORT {at} amibroker.com
>> >
>> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> > http://www.amibroker.com/devlog/
>> >
>> > For other support material please check also:
>> > http://www.amibroker.com/support.html
>>
>> > Yahoo! Groups Links
>> >
>> >
>> >
>>
>>
>>
>>
>
> ------------------------------------
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
>
>
>
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|