• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How best to extract digits from a string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How best to extract digits from a string?


  • Subject: Re: How best to extract digits from a string?
  • From: Jed Verity <email@hidden>
  • Date: Thu, 26 Apr 2001 15:47:34 -0700

Fascinating stuff. After placing the literal outside of the loop, I actually
found (with 30000 loops) Paul's original suggestion to be quite a bit faster
than the concatenation method.

Moral of the story:
If you need to concatenate a single value to a string repeatedly, use the
"set end of <list>" method and convert to a string after the loop. If the
concatenated values are going to be different within each cycle of the loop,
use the standard "set str to str & <literal>" method. Right?

On 4/26/01 1:52 PM, you wanted me to know this:

>> Date: Thu, 26 Apr 2001 10:09:51 -0700
>> Subject: Re: How best to extract digits from a string?
>> From: Paul Berkowitz <email@hidden>
>
>> On 4/26/01 9:36 AM, "Jed Verity" <email@hidden> wrote:
>>
>>> After running some simple benchmark tests, I found the concatenation method
>>> to be dramatically faster for strings.
>>
>> And so it is. Much faster. My error, and good to find out.
>
> You guys have to stop putting these issues to bed before I have
> had a chance to look at them...
>
> ;-)
>
>
> Arthur J. Knapp
> http://www.stellarvisions.com
> mailto:email@hidden
>
> Hey, check out:
> http://homepage.mac.com/richard23/
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


~)~)~)~)~)~)~)~)~)~)~)~)~)
Jed Verity


  • Follow-Ups:
    • Re: How best to extract digits from a string?
      • From: Nigel Smith <email@hidden>
References: 
 >Re: How best to extract digits from a string? (From: "Arthur J Knapp" <email@hidden>)

  • Prev by Date: Re: Non-modal information window showing progress?
  • Next by Date: move font file from font folder
  • Previous by thread: Re: How best to extract digits from a string?
  • Next by thread: Re: How best to extract digits from a string?
  • Index(es):
    • Date
    • Thread