• The performance page in the documentation says that globals are slower to find, but finding out by how much suprised me.

    It depends on your app, but if you think about it, it's got to look back at every point along the scope, searching all function vars, then vars in the scope that function was defined in, and so on...

    I did have plans for a cache to speed it up, but because it's JS there are all kinds of nasty edge-cases that mean that while it'd work in virtually all cases, you could come up with some code that broke it - and one thing I've found with Espruino is if there's an edge-case, someone will find it sooner or later and complain :)

About

Avatar for Gordon @Gordon started