• 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: AS: Compiled or interpreted?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS: Compiled or interpreted?


  • Subject: Re: AS: Compiled or interpreted?
  • From: has <email@hidden>
  • Date: Fri, 15 Mar 2002 12:53:07 +0000

ThePPCGod wrote:

>This is a simple question, but one I've never seen the answer to. Is
>AppleScript run as compiled (i.e. - machine) code or as interpretted code at
>runtime when saved as a 'compiled script'? I know the answer seems obvious
>(compiled script = compiled code), but I'm not so sure that it actually is.
>Chris ought to know... comments?

Interpreted bytecode. Sort of a halfway house.

Your original AS code is parsed into a simpler, more machine readable form
at compile-time. The bytecode isn't machine instructions (a whole different
kettle of fish), but it executes faster than if the interpreter had to
parse each line of your original AS code every single time it needed it.

As you know, your code is also syntax checked at this point; static
variable scoping and other stuff that makes life easier for the interpreter
is also taken care of. Lots of other work is left till runtime, however,
which is why, for example, you'll find AS compiles much faster than C, but
executes somewhat slower. (i.e. It's a tradeoff.)

HTH

has

http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: FADE DEAD
  • Next by Date: The Ones & Oh's of Logic
  • Previous by thread: Re: AS: Compiled or interpreted?
  • Next by thread: Scripting a command to unix with sudo fun
  • Index(es):
    • Date
    • Thread