@Gordon, I wonder how the interpreter works on this line https://github.com/wagnerf42/gps/blob/main/app.js#L339
it is called in a for loop - does the parser parse the function again each loop cycle or the second pass will reference previously parsed body only with different context with different variable values? or if the function would contain "jit" inside would it make separate copies of the method each loop iteration? how much wasteful this repetitive function definition it is regarding memory per each loop?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon, I wonder how the interpreter works on this line https://github.com/wagnerf42/gps/blob/main/app.js#L339
it is called in a
for
loop - does the parser parse the function again each loop cycle or the second pass will reference previously parsed body only with different context with different variable values? or if the function would contain "jit" inside would it make separate copies of the method each loop iteration? how much wasteful this repetitive function definition it is regarding memory per each loop?