PureBytes Links
Trading Reference Links
|
Thanks Herman, that's exactly what I needed. I
expected that barindex based method will be faster but didn't expect it'll
be over 10x.
gty
<BLOCKQUOTE dir=ltr
>
----- Original Message -----
<DIV
>From:
Herman van den
Bergen
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, May 16, 2004 2:06 PM
Subject: RE: [amibroker] Which is faster
?
You
can easily check which is faster. Using some dummy parameters (I don't know
yours), on a 2.133 GHz Athlon, this is what I get
using DebugView:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>was_buy=IIf<FONT
color=#000000>(when_buy < when_sell AND data_buy==data_sell
AND data="">1<FONT
color=#000000>,0<FONT
color=#000000>);
// 337
microSeconds
was_buy=<FONT
color=#0000ff>IIf(BarsSince(Buy1) > <FONT
color=#0000ff>BarsSince(Sell1) AND data_buy==data_sell
AND data="" color=#ff00ff>1,<FONT
color=#ff00ff>0); // 4930
microSeconds
<IMG alt="" hspace=0
src="jpg00062.jpg" align=baseline
border=0>
<FONT face=Arial color=#0000ff
size=2>
This
shows that if your programs execute slow and take minutes or
even hours to complete you should try some code-optimizations, I
couldn't do without DebugView anymore. I added a menu item in the Custom
Tools menu in AB, that way it is only a click away.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>herman.
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
Attachment:
Description: ""
|