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

Re: [amibroker] Re: Most Used Code



PureBytes Links

Trading Reference Links

Mike,

You are right, and I have been converting them over since I recently  
realized I could do this, so I may have even more conversions than are  
showing up in the timing at this point.  I also would like to know,  
but have not tested to see if it is any faster.  However for some, I  
convert the index once and use it two or more times, so it might be  
faster to leave it alone.

BR,
Dennis

On Jun 25, 2009, at 10:32 PM, Mike wrote:

> If I understand you correctly, you could probably get rid of all of  
> your NumToStr usages entirely by just concatenating the index suffix  
> directly to the String prefix (e.g. "VarName" + index).
>
> The + operator will automatically convert the number to a string  
> when the left hand side is a string.
>
> The NumToStr function is only really required when trying to format  
> fractional floating point values or when dealing with dates.
>
> Though, I haven't tested to see if the + operator is any faster.
>
> Mike
>
> --- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:
>>
>> On my system the most executed code and the one taking the most time
>> is NumToStr().  29 calls and 100ms of time used.
>> I think it is from converting an index to a string to append to a
>> static variable name for faking string arrays.
>> I already converted most of the static numeric arrays to the new
>> static array type.
>> Strange what pops up.  I would have never guessed that this would be
>> the one taking so much time.
>> Perhaps that is an argument for built-in string arrays.
>>
>> BR,
>> Dennis
>>
>> On Jun 25, 2009, at 6:41 PM, brian_z111 wrote:
>>
>>> I was speculating on which line of code is the most frequently used
>>> AFL.
>>>
>>> I would like a zloty for every time I have typed:
>>>
>>> Plot(variable,"variable",1,1);
>>>
>>>
>>>
>>
>
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/