Question

I have an embedded processor that is running a trimmed down version of BASIC (Parallax BASIC Stamp). In a loop, I am writing 1024 values via the SPI bus.

In compiled languages, more speed can be gained by unrolling the loop (putting more statements into the loop, reducing the overhead to statement ratio). However, I am not sure about BASIC since it is an interpretive language and each statement is interpreted before it is executed.

Profiling is difficult since I have to find an available pin, write a pulse to it, then measure with an o'scope.

From a theory point of view, does loop unrolling in BASIC provide any speed benefits?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top