• 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: Problems with speed & issues with coercion in OS 9.2.2 (App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with speed & issues with coercion in OS 9.2.2 (App


  • Subject: Re: Problems with speed & issues with coercion in OS 9.2.2 (App
  • From: Nigel Garvey <email@hidden>
  • Date: Sun, 27 Jan 2002 12:53:50 +0000

Arthur J Knapp wrote on Sat, 26 Jan 2002 18:10:52 -0500:

[Some excellent advice snipped]

>The following should be much faster:
>
> on IsFolder( string_or_alias )
>
> -- We say "as alias" first to make sure that the item
> -- exists, and to ensure that there is a colon at the
> -- end of the path.
> --
> return ( ( string_or_alias as alias ) as string )'s item -1 = ":"
>
> end IsFolder

'Ends with' is about twice as fast as 'item -1 =' in a straight race, so
that would contribute slightly more still to the speed here:

return (string_or_alias as alias as string) ends with ":"

NG


  • Prev by Date: Re: Problems with speed & issues with coercion in OS 9.2.2
  • Next by Date: Re: GC Scale
  • Previous by thread: Re: Close Access
  • Next by thread: Re: Problems with speed & issues with coercion in OS 9.2.2 (App
  • Index(es):
    • Date
    • Thread