How fast does the BL600 execute a smartBASIC application?

Your smartBASIC source code is translated into an array of 16 bit word codes, each containing eight flag bits and an eight bit index value which is in turn used to index into an array of function pointers. Each function pointer is a ‘C’ function in the run-time engine, which collectively makes up a virtual machine akin to what you see in Java but implemented at much higher level. When a smartBASIC application is launched, the run-time engine sits in a very tight loop calling these function pointers (the program counter is the position of the next word code to process). This tight loop consists of roughly ten assembler instructions. The function pointer may be as small as a dozen assembler instructions depending on what that word code is meant to achieve or many hundreds of assembly instructions if for example a BLE operation is being invoked.

Based on this, the best answer to the question is that it all depends on what the program is doing. For your convenience, Laird has a speed test script. It has been calibrated to generate a metric of 100% for the first release of our BL600 back in April 2013 and is available here.  We also have smartBASIC implemented in Windows applications, and we have seen the speed metric as high as 6400% given the BL600 has an Arm-Cortex running at 16Mhz and a PC runs at GHz speeds and has multiple processors. Another way to gauge the speed of the run-time engine is to write an app that just toggles a GPIO pin and see what frequency you will achieve.

Categories