You are reading a single comment by @CanyonCasa and its replies.
Click here to read the full conversation.
-
Thanks. I have looked at Performance page, Compilation, Inline Assembler, and other related documentation, but it took a couple more examples to sink in. When you said execute, I was confused by the exact example you showed above where the function would not be executed until actually called. This has helped a bunch.
It really does execute the code. For example:
will create a 100 element array called
a
after it is uploaded.However functions (and what is in them) won't be executed (unless you explicitly execute them). So:
won't create an array. All that is stored is some data representing the function, and the source code inside it.
It might be worth taking a look at this: http://www.espruino.com/Performance