Spark Core Execution Speed

I should hope not... and I've actually never tested this but should! and just did!


If you disable the Wi-Fi by adding #include "spark_disable_wlan.h" to you application, the time it takes for the background code to process is reduced from 5-6ms down to 1.5ms.

If you really just want to run your Spark Core like an Arduino in the tightest loop possible, you can disable the WLAN as above, and put a while(1) {} execution loop inside your user loop(). Measuring the time it takes now from end of while(1) {} loop to the top, is about 55ns (or about 4 cycles of a 72MHz clock).

#include "spark_disable_wlan.h"
void setup() {

}
void loop() {
  while(1) {
    // your code goes here 
  }
}

You could also chose to stay in this hard loop, and then later decide to turn on the Wi-Fi, and manually process the background tasks, or let your user loop() run to the end and let them process themselves. In the near future there will be easy functions to help facilitate these actions and modes as well.