RFC: Optimizing stripDup()

2001-11-02 Thread diskot123
(Note that this implementation has chosen to force every key to have a value. That's because it relies on empty to indicate that a key hasn't been defined yet. If there was an atomic test for 'is-a-key' (is there?) if someKey is among the lines of the keys of myArray Actually it would probably

Re: RFC: Optimizing stripDup()

2001-11-01 Thread LiangTyan Fui
On 11/1/01 3:46 PM, andu wrote: LiangTyan Fui wrote: On 10/29/01 11:09 PM, eugen helbling wrote: Hi LiangTyan, just to demonstrate that the new split(I like them) can do in case of duplicate removing. for example you have a field/variable having something like nameA,firstnameB cr

Re: RFC: Optimizing stripDup()

2001-10-31 Thread LiangTyan Fui
On 10/29/01 11:09 PM, eugen helbling wrote: Hi LiangTyan, just to demonstrate that the new split(I like them) can do in case of duplicate removing. for example you have a field/variable having something like nameA,firstnameB cr nameA,firstnameC in it, you can use split handler to

Re: RFC: Optimizing stripDup()

2001-10-31 Thread andu
LiangTyan Fui wrote: On 10/29/01 11:09 PM, eugen helbling wrote: Hi LiangTyan, just to demonstrate that the new split(I like them) can do in case of duplicate removing. for example you have a field/variable having something like nameA,firstnameB cr nameA,firstnameC in it,

Re: RFC: Optimizing stripDup()

2001-10-28 Thread Michael J. Lew
This version is about 200 times faster than the original for a list of 400 words: function stripDup theList,theitemDel set the itemDelimiter to theItemDel repeat for each item theItem in theList if itemArray[theItem] is empty then put 1 into itemArray[theItem] put

Re: RFC: Optimizing stripDup()

2001-10-26 Thread Jacqueline Landman Gay
Geoff Canyon wrote: Maybe something like: Geoff's is faster than mine. I never thought to use arrays. Pretty impressive. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com Archives:

Re: RFC: Optimizing stripDup()

2001-10-26 Thread Jacqueline Landman Gay
LiangTyan Fui wrote: Here is a function that I've written quite some time ago. It takes a list of text theList, separated by theitemDel, remove duplicate items in the list, and returns a new list without duplicate items. Unfortunately, this function running rather slowly on a large list (a

Re: RFC: Optimizing stripDup()

2001-10-26 Thread LiangTyan Fui
On 10/27/01 2:34 AM, Jacqueline Landman Gay wrote: Geoff Canyon wrote: Maybe something like: Geoff's is faster than mine. I never thought to use arrays. Pretty impressive. Yup, the winner is Geoff. Thanks! Now, where should I post this script to? Do we have an organised xTalk library