• Thanks for letting me know - it should be fixed now. I'd done an update/restart on the server and there was a path issue.

    Was avoiding "compiled" a general comment

    Yes, it's a general comment. For instance in the modules you sent me for inclusion in EspruinoDocs the compiled functions weren't actually compiled anyway because they were inside a class declaration. In the cases I saw if you'd used some of the JS example code I'd posted up in replies to your previous questions it would have been several times faster.

    Basically in all the cases I have seen so far it's just being used as a 'magic fix' - adding "compiled" to functions that you think might be slow isn't a substitute for benchmarking and taking a more analytical approach. Instead it adds an opportunity for loads of potential bugs, is slower to upload, uses up more memory, and isn't debuggable.

    Using compiled should really be a last resort IMO, when you've exhausted all other approaches to improving speed. There's a reason that none of the modules I've written for Espruino use it, and even when I include JS code inside the Espruino interpreter itself, it's kept as JS and isn't compiled.

About

Avatar for Gordon @Gordon started