| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, There are many places where the following note is mentioned: "Top-level invokations of commands are not byte-compiled, so be aware to put most of them into procedure(s), so they run faster." -...or something like that. Well, why aren't they compiled? What is the reason to aviod compiling them? -- Pozdrawiam! (Regards!) Googie |
|
#2
| |||
| |||
| On Aug 27, 2:08 pm, Googie <n...@spam.0rg> wrote: > Hi, > > There are many places where the following note is mentioned: > > "Top-level invokations of commands are not byte-compiled, so be aware to put > most of them into procedure(s), so they run faster." -...or something like > that. > > Well, why aren't they compiled? What is the reason to aviod compiling them? Because since they are toplevel they will run just once, hence the cost of compiling them will not be diluted over several runs of the bytecode. See Miguel's recent summary on this: http://groups.google.com/group/comp....1bafa752a80104 -Alex |
|
#3
| |||
| |||
| On 27 Aug., 14:36, Alexandre Ferrieux <alexandre.ferri...@gmail.com> wrote: > Because since they are toplevel they will run just once, hence the > cost of compiling them will not be diluted over several runs of the > bytecode. See Miguel's recent summary on this: > > http://groups.google.com/group/comp....e_frm/thread/d... If you want to force compilation, put the code in question into an "if 1 { ... }" block. Code in procedures still has the advantage that local variables can be dealt with more efficiently. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.