what does and doesn't get complied in a standalone?

Richard Gaskin ambassador at fourthworld.com
Thu Sep 13 15:23:24 EDT 2012


Dr. Hawkins wrote:
> After many recent posts, I'm starting to wonder:  what does and
> doesn't get complied in a standalone?
>
> Several messages have suggested, if I'm reading them write, that the
> main stack is compiled, while the others, even if password protected,
> are interpreted at runtime.  Am I getting that right?
>
> And if so, what is the performance hit?
>
> So should all of the more intensive work be moved into routines in the
> main stack?

No difference between mainstack made into an app and any other stack 
files used for code.  And AFAIK no difference in execution speed between 
password-protected and non-protected scripts, though I haven't measured 
it in many years.

In the modern world with so many different types of compilers, 
determining exactly what "compile" means can be tricky.

My understanding of what LiveCode does is that it uses a two-pass 
compilation method, similar to many other high-level languages, in which 
a script is tokenized into a highly efficient bytecode format at runtime 
as objects are unpacked, and that bytecode is then run through the 
engine during execution.

Exceptions to this include "do", "send", "call", and "dispatch", which 
must be tokenized on the fly since they're effectively working with 
dynamic strings, which explains why those run so much slower than 
alternatives.

If anyone has more details beyond this I'd love to hear them.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list