I just finished my last project that is based on a TEENSY3.1 and an ESP8266 wifi module (s. here: WIFI-NEWSFEEDREADER IN A MATCHBOX (based on TEENSY3.1 and ESP8266-03; programmed with ARDUINO-IDE) - YouTube) when I was told that I could have done the whole thing without the Teensy, but only with the ESP8266 as there is an ARDUINO-IDE-addon available that enables to program the ESP8266 with the ARDUINO-IDE. I immediately tried it and a simple test-program worked on the first try. I'm not sure if I will manage to port the code of the FEEDREADER as I don't know if I will make "u8glib" work with the ESP8266, but I first decided to do a simple benchmark to see how fast the ESP8266 is in comparison to a TEENSY3.1 and an ARDUINO-DUE.
It seems that the ESP8266 is good with float (floating point unit inside?), but relatively bad with integer!
void setup() {
Serial.begin(115200);
}
void loop() {
float a = (float) millis();
int time = millis();
for (int i = 0; i < 100000; i++) a += a * a + 1000.7 / a - 40.4;
time = millis() - time;
Serial.println("floating point calculations");
Serial.println("---------------------------");
Serial.print("a = ");
Serial.println(a);
Serial.print("dT[ms] = ");
Serial.println(time);
Serial.println("");
time = millis();
int b = time;
for (int i = 0; i < 100000; i++) b += b * b + 1000 / b - 40;
time = millis() - time;
Serial.println("integer calculations");
Serial.println("------------------");
Serial.print("b = ");
Serial.println(b);
Serial.print("dT[ms] = ");
Serial.println(time);
Serial.println("");
delay(1000);
}
//I first tried it with trigonometry-functions, but the ESP8266 crashed!
It seems the 8266 does not include FPU as an 32bit FPU does the math you use in the benchmark 10-20x faster. It might be the 8266 is an MIPS and the others are ARMs so the math implementation efficiency may differ.
I know this is an old topic, but hey
I just ran this same benchmark on my brand new Teensy 3.6 @180MHz
It came out with:
Float: 139ms
Int: 50ms
BUT: this is after increasing the number of runs 10 fold, that is, running 1,000,000 instead of 100,000 - this would render the 3.6 roughly 30 times faster for float and just under 10 times faster for int calculations than the ESP8266. Not bad at all.
Running at the maximum Overclock frequency of 240MHz, those numbers change to:
Float: 104ms
Int: 38ms.
again, if you want to compare those figures to the ones reported further up in this thread, divide them by 10!
Fantastic thread! I hope this remains open for future upgrades to this benchmark.
I use the ESP8266 extensively on projects for industrial-type process control where internet connection is required. Two implementations use a ESP8266 as central controller for over a year now without one single reboot, reset or lost internet connections.
Maybe I miss something but I do not understand the fuss about the Teensy: the ESP8266 has -in my maybe prejudiced opinion- all the features (except number of I/O) at least of a Teensy, plus internet connectivity.
I developed my own ESP8266 production PCB, it includes a auto-reset programming feature (I use DTR to automatically set the chip in program mode, no need to fuss with handling wires to get the chip in program mode) and although about 8 I/O pins is very limited, to me it is more than enough to handle process control projects. If insufficient I/O there now is the ESP32.