I've got the code in the benchmarks directory that I've been using - they're not perfect though.
Are you compiling with RELEASE=1? Without it, the asserts are left in which really kills performance.
The stuff marked ALWAYS_INLINE is worth going for first. Specifically jsvGetAddressOfLock, UnLock, Ref, UnRef, Get/SetXXXChild/Sibling are all very small functions with big improvements from inlining (in fact they shouldn't increase code size much at all).
Same for jsvIsXXX - in fact by inlining those, the compiler should be able to remove some of the null checks.
Perhaps you could look at having two inline defines, ALWAYS_INLINE and MAYBE_INLINE or something?
Espruino itself really isn't that fast though - or does ESP8266 look bad in comparison with other STM32 based boards?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I've got the code in the
benchmarks
directory that I've been using - they're not perfect though.Are you compiling with
RELEASE=1
? Without it, the asserts are left in which really kills performance.The stuff marked
ALWAYS_INLINE
is worth going for first. SpecificallyjsvGetAddressOf
Lock
,UnLock
,Ref
,UnRef
,Get/SetXXXChild/Sibling
are all very small functions with big improvements from inlining (in fact they shouldn't increase code size much at all).Same for
jsvIsXXX
- in fact by inlining those, the compiler should be able to remove some of the null checks.Perhaps you could look at having two inline defines,
ALWAYS_INLINE
andMAYBE_INLINE
or something?Espruino itself really isn't that fast though - or does ESP8266 look bad in comparison with other STM32 based boards?