You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • While it sure isn't as trivial an optimization as it seemed to me at first, the speedup (and space savings?) from your benchmarks sound great!

    I've updated to the latest firmware. When I try to reinstall all the apps I get the errors in the attachment. The first time I tried, it got stuck updating the Scheduler app. I manually uninstalled/installed it, then tried again. Now it doesn't get stuck but it outputs those errors.

    In the WebIDE, if I enable pretokenization on Synthwave and try to upload to RAM I get the following error:
    You have more open brackets than close brackets. Please see the hints in the Editor window.
    Apparently it's trying to reformat the pretokenized code and breaks.

    If I don't enable pretokenization, Synthwave uploads to RAM successfully, but the C++ code no longer works, I haven't looked into what broke yet. If I enable pretokenization but upload to storage instead of RAM, it crashes. It only works if I disable pretokenization and upload to storage.

    Enabling Esprima minification results in "Error: Unreachable point. logically broken.", but the code uploads anyway.

    Edit:
    The following works with pretokenization in Storage but not in RAM.

        let c = E.compiledC(`
        // int boop(int)
        int boop(int d) {
          return d * 42;
        }
        `);
        print('boop:', c.boop(3));
    
  • The following works with pretokenization in Storage but not in RAM.

    Oh, I would expect the opposite! With current tokenization the inline C as part of storage file could now have atob array automatically expanded and tokenized so the binary string with executable code may point to the flash memory instead of RAM.

    could be fixed by inline compiler by generating something like var b="base64encodedstring";var bin=atob(b) or maybe bin=""+atob("xxx") or maybe atob("xxxx",true)

  • Oh, I would expect the opposite!

    That snippet doesn't have static/global variables, so it should be fine anywhere. The crash is probably due to the IDE replacing unknown characters with ? when uploading.

    bin=""+atob("xxx")

    This would be best, the others would avoid the atob optimization.

About

Avatar for fanoush @fanoush started