You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I conclude that Espruino does not separate variables' meta-data form variable data

    It'd be worth looking at and Espruino has the concept of a 'name' and an actual value.

    So something like hello = 5 gets packed into 2 variable blocks - hello and 5. It's only when you get to some special cases (4 or less chars, plus a <16 bit integer) that it packs the two together. Either way, you do have some unique area of memory you can point to that corresponds to a specific variable.

    I think we might be getting sidetracked from APA102s though. The single-char cache might work, but I'm wary that there may be some nasty edge cases - it'd be a case of trying it when I have some time, and seeing if it broke any of the language tests.


Avatar for Gordon @Gordon started