You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I should add that JIT also lets you do some really neat stuff. You can construct your own function in code, then eval it to JIT compile it to fast, native code:

    var data = new Uint8Array(1000);
    for (var i=0;i<data.length;i++) data[i]=i;
    
    var jit_me = "(function(d) { 'jit';";
    for (var i=0;i<8;i++) jit_me += `digitalWrite(LED,d&${1<<i});`
    jit_me+="})";  
    
    var jitFn = eval(jit_me);
    data.forEach(jitFn);
    
About

Avatar for Gordon @Gordon started