Applescript Vs C

There is probably no comparison when considering the two options. However a friend of mine does NT scripting. He said that NT scripts, the more complex the script becomes, the more slower it runs and that C runs alot faster than most scripts. I was wondering if Applescript faces the same problem and does C really run faster???

Action for action, C’s definitely faster than AppleScript, since it’s a lower-level language. AppleScript itself is written in C (I think) and much of the action that takes place when an AppleScript command’s executed is C code that analyses the command and its parameters, checks for errors, and decides what other bits of code to use to carry out the command. If you can write C code that does what’s needed directly, without all that overhead, it’s obviously going to run faster.

I don’t know about NT, but the main cause of speed loss in AppleScript is inefficiency rather than complexity. Sometimes it’s an unavoidable consequence of the language or the systems with which it interacts. Often it’s just down to suboptimal script code.