Go Down

Topic: ESP8266 breakout performance speedTest (Read 3625 times) previous topic - next topic

mantoui

Dec 08, 2015, 01:30 pm Last Edit: Dec 03, 2016, 11:56 am by mantoui
Here are a few performance numbers for the ESP8266 breakout running Arduino IDE sketches.
sparkfun thing dev

speedTest numbers from old UNO sketch
Code: [Select]
                            Teensy3.1   DUE   ESP8266   ZERO    CC3200
                              96mhz    84mhz   80mhz   48mhz    80mhz
  nop                       : 0.010 :  0.012 : 0.013 :  0.021 : 0.013 us
  Arduino digitalRead       : 0.146 :  1.033 : 0.527 :  0.901 : 0.576 us
  Arduino digitalWrite      : 0.466 :  1.263 : 0.430 :  1.366 : 0.436 us
  pinMode                   : 0.238 :  3.068 : 1.472 :  1.938 : 2.956 us
  multiply volatile byte    : 0.062 :  0.118 : 0.100 :  0.201 : 0.100 us
  divide volatile byte      : 0.088 :  0.138 : 0.402 :  0.606 : 0.101 us
  multiply volatile integer : 0.062 :  0.083 : 0.148 :  0.168 : 0.074 us
  divide volatile integer   : 0.068 :  0.093 : 0.447 :  0.906 : 0.081 us
  multiply volatile long    : 0.063 :  0.083 : 0.148 :  0.168 : 0.074 us
  multiply single float     : 0.456 :  0.903 : 0.735 :  2.796 : 0.979 us
  multiply double float     : 0.686 :  1.158 :  0.860 :  4.183 : 1.204 us
  divide double float       : 11.923 : 19.118 : 9.997 : 43.546 : 20.971 us
  random()                  : 0.373 :  1.368 : 4.498 :  9.771 : 0.571 us
  bitSet() with volatile    : 0.052 :  0.070 : 0.110 :  0.124 : 0.074 us
  analogRead()              : 8.448 : 39.543 : 384.497 : 423.096 : 8.596 us
  analogWrite() PWM         : 1.678 :  3.508 : 10.497 :  8.291 : 6.186 us

I had to sprinkle in some yield() calls and reduce some loop counts to avoid WDT reset.
From the IDE, you can select 160Mhz, but that seemed to only speedup the NOP loop ??

Here are some more anecdotal comparative performance numbers.

On my local wifi net, testing to a wired Ubuntu box, I measured the following network performance:
Code: [Select]
ESP8266
 ping rtt min/avg/max/mdev = 0.832/0.967/1.093  ms
 TCP send: 0.28 mbs  receive: 8.6 mbs  (sending or receiving 1000-byte records)
 UDP 8-byte echo RTT: 716us  (though more than 1 second  after a delay() ?)
 UDP send: 28 mbs  receive: 30.7 mbs   (1000-byte packets)
-----------
CC3200
  ping tt min/avg/max/mdev = 19.213/80.313/139.361/30.570 ms
  TCP send: 12.6 mbs  receive: 2.8 mbs
  UDP echo RTT: 2146 us
  UDP send: 1.8mbs  receive: 86mbs  (breaks packets into 255-byte packets?)
-----------
WINC1500   (SPI clock 12MHz)
  ping rtt min/avg/max/mdev = 5.282/7.151/16.072/2.897 ms
  TCP send: 3.3 mbs  receive: 2.8 mbs
  UDP echo RTT: 2421 us
  UDP send: 3.9 mbs  receive: 3.4 mbs (large recv buffers?)


  Your mileage may vary.  (mbs is megabits/sec)
On ESP8266 I could not send more than 5 back-to-back UDP packets.  Also ESP8266 UDP won't send packets larger than 512 bytes unless you hack pbuf_unit_size in UdpContext.h

Also see comparative  SPI performance and wiznet speeds

I don't know the specs of the 26MHz crystal on the Sparkfun board, but its frequency is only off by -25 ppm (spec is probably 30ppm).  In run loop with USB power, I measured power consumption at 29ma. With wifi active, power consumption is 90ma, with higher peaks.

EDIT: added CC3200 and WINC1500 data

Go Up