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 To: [email protected] 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
