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

Re: [amibroker] Execution Speed Differences



PureBytes Links

Trading Reference Links

Hello,
 
In short: any COM call is much slower than AFL.
 
The assignment in AFL internally is just few lines  of assembly code.
 
Any COM call is huge machine going thru system DLLs (part of windows).

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Ken Close
Sent: Sunday, July 06, 2008 4:18 PM
Subject: [amibroker] Execution Speed Differences

Can someone comment on these specific code and data differences which might cause different execution times?
 
In the first case, does this entry code differ fundamentally from the alternate below in terms of execution time?
 
This points directly to the Watchlist irrespective of what Filter is set.
 
list = CategoryGetSymbols(categoryWatchlist, 16);
Code continues here
 
The following uses COM object to make it easy for the Filter selection to be used internally in the code
 

AB = CreateObject("Broker.Application");

AA = AB.Analysis;

WL = AA.Filter(0, "WatchList");

List = CategoryGetSymbols(categoryWatchlist, WL);

Same code continues here.

 

My question is whether this second way of coding the selection of the Watchlist should have any effect on execution time.

 

I thought I read that the first three lines are OOP lines which are not AFL code and should not affect the normal way AFL operates (meaning that the first three lines are executed once and then the remaining AFL code is executed for each symbol in the Watchlist).

 

It seems to me that execution time is much faster using the first construct rather than the second.  Should this be true?

 

Thanks for any insights.

 

Ken 

 
 
 
 
 
__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___