Optimisations that end up not calling the function at all are probably going to be very significant :)
For measuring maybe the DWT CYCCNT register can be used.
Maybe... IMO the best way to benchmark this is to write enough data that it takes a noticeable amount of time (you can do it with CS not asserted so it's ignored) and then measure that.
But just in general, based on your other comments: I'm all for optimising flash memory access, graphics, and Espruino in general - but if this is specifically for a single-purpose function for blitting a small portion of screen it may not be something I'd want to pull into Bangle.js, given we're currently using pretty much all the available flash memory.
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.
Optimisations that end up not calling the function at all are probably going to be very significant :)
Maybe... IMO the best way to benchmark this is to write enough data that it takes a noticeable amount of time (you can do it with CS not asserted so it's ignored) and then measure that.
But just in general, based on your other comments: I'm all for optimising flash memory access, graphics, and Espruino in general - but if this is specifically for a single-purpose function for blitting a small portion of screen it may not be something I'd want to pull into Bangle.js, given we're currently using pretty much all the available flash memory.