[algogeeks] Re: String and Array Performance Issue

2008-11-05 Thread daizi sheng
I do not think you method will get problems unless the string is too long. But will you use too long string in JavaScript? Anyway, if you really want to get this done more effeciently, I suggest you to use predefined *replace* functions of String object. On Wed, Nov 5, 2008 at 3:56 PM, Adrian

[algogeeks] Re: String and Array Performance Issue

2008-11-05 Thread Adrian Godong
Hum, I may be able to use that replace function. Let me check on it. The problem now is that I have more than 1000 value on the string, it's very slow on the iteration (not on the memory). I presume concatenating strings are slow as usual. On Wed, Nov 5, 2008 at 5:19 PM, daizi sheng [EMAIL

[algogeeks] Re: String and Array Performance Issue

2008-11-05 Thread Adrian Godong
Yes, but that'll be too complex. I have tried the string.compare and it works like wonder! Shave off a lot of computing time. Thanks a lot! On Wed, Nov 5, 2008 at 5:37 PM, daizi sheng [EMAIL PROTECTED] wrote: An alternative method is splitting the big string into pieces and storing such

[algogeeks] Re: String and Array Performance Issue

2008-11-05 Thread Geoffrey Summerhayes
On Nov 5, 9:01 am, Adrian Godong [EMAIL PROTECTED] wrote: Yes, but that'll be too complex. I have tried the string.compare and it works like wonder! Shave off a lot of computing time. WTF!? Using a pipe delimited string and string operations to keep track of over 1000 values is the simple

[algogeeks] Re: String and Array Performance Issue

2008-11-05 Thread Adrian Godong
OK, I was dumb. Thanks, On Thu, Nov 6, 2008 at 1:27 AM, Geoffrey Summerhayes [EMAIL PROTECTED]wrote: On Nov 5, 9:01 am, Adrian Godong [EMAIL PROTECTED] wrote: Yes, but that'll be too complex. I have tried the string.compare and it works like wonder! Shave off a lot of computing time.