>> PARTICLE.IO PHOTON PERFORMANCE - HOW DOES IT COMPARE?
Rarely do I get a first good impression of hardware; but the particle.io
devices peak my interest.
In my
earlier blog
post I covered a initial hands on with the particle.io Photon hardware - a
very affordable embedded device with a complete ecosystem for device management,
firmware delivery, a custom cloud and a mobile SDK for building apps.
I have personally always liked a bare-bones embedded platform; but most of
these great features exist mainly due to the fact the device runs a RTOS
and provides a user space for sketches. How does this impact the performance
of the device with the background resources required for the RTOS?
As we identified the specifications of the particle.io Phonton were ok:
First of all; I wanted to identify how much of the 128KB memory would
actually be available for the user sketches - digging into the documentation
it is easy to find a system API to return the amount of memory:
Running the application and we are presented with a nice 63,912 bytes of
available RAM for use in the user sketch - thats plenty :) at least when
comparing it to an Arduino UNO using an 8bit AVR CPU and 2KB of RAM. Now
it is time to put the platform to a real test - how can it handle a
complex operation such as RSA that I ran as a benchmarch
previously
on Arduino devices.
I would predict, based on the similarities between CPU architectures and
available RAM that the particle.io Photon device would perform approximately
around the same speed, if not better than an Arduino Due. I would suspect
that the RTOS would not degrade the performance of the CPU more than 40% -
I guess there is only one way to find out!
.... number crunching ....
And the results are in! Performing the RSA cryptographic functions using the
public key takes 686ms, and on the private key 58,754ms (without optimizations).
As expected; the comparable device would be the Arduino Due, which had
performance metrics of 1032ms and 88,216ms respectively. Effectively; the
particle.io photon device performs 50% better than the Arduino Due.
Overall; this maps to the difference in CPU speeds as well (120Mhz vs 84Mhz)
so it is clear that the RTOS has little to no affect on the performance of
the device under these conditions. It can now be confirmed that the user
sketches are in fact executed natively with little or zero overhead.