I've stumbled upon the pretokenise flag (E.setFlags({pretokenise:1})) and I'm wondering if it's worth setting it on an Espruino Puck or WiFi.
As far as I can guess pretokenised JS code doesn't need to get eval'ed anymore, which has the potential to speed up execution significantly.
Does it accelerate the execution of long running code, or has the code already been pretokenised after a while?
Are there any gotchas except of readability and changeability of the tokenised code?
Any comments are appreciated.
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.
I've stumbled upon the pretokenise flag (
E.setFlags({pretokenise:1})
) and I'm wondering if it's worth setting it on an Espruino Puck or WiFi.As far as I can guess pretokenised JS code doesn't need to get eval'ed anymore, which has the potential to speed up execution significantly.
Does it accelerate the execution of long running code, or has the code already been pretokenised after a while?
Are there any gotchas except of readability and changeability of the tokenised code?
Any comments are appreciated.