You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • During my test with a driver for LED panel, @Gordon added a very nice speed up function.

    This looks very good, and I gave it a chance to become a seperate function. In first test, it even speeds up bit.
    @Gordon, usually you have some good ideas. Could this be a starting point for a kind of prebind, not saying precompile ?

    void jswrap_espruino_speedy_callback(int val, void *data){
      JsVar *fnc = (JsVar*)data;
      JsVar *value = jsvNewFromInteger(val);
      if(jsvIsFunction(fnc)) jspExecuteFunction(fnc,0,1,&value);
      jsvUnLock(value);
    }
    void jswrap_espruino_speedy(JsVar *arrayFunction, JsVar *arr){
      jsvIterateCallback(arr,jswrap_espruino_speedy_callback, arrayFunction);
    }
    
About

Avatar for JumJum @JumJum started