Digital Larry
Active member
Among more elite crowds, over the tinkling of glasses of chardonnay, one can occasionally discern such statements as: "SpinCAD generates such terribly inefficient code!" accompanied by clutching of pearls and so on.
I wasn't even planning on working on this, but you know how that goes. Anyway, it looks promising in that:
a) I have figured out a way to scan the generated code looking for patterns which can be optimized.
b) I have come up with the lowest hanging fruit in this area, which is to get rid of the extra instruction that is often used to join two blocks together.
On the left, you see pre-optimized code. The code of yesteryear, one might say. And on the right, you see that 4 instructions have been saved in a very small program. So, this is likely to help most when you have a lot of blocks. And it will help mostly when the blocks are all in a row. And it will help more when the blocks have their input pin as the first instruction. Like in this design:
I should remind you that NOT ALL BLOCKS have their input as the very first instruction. But many do!
I'm going to hammer on this a bit more and then make a beta available to see if anyone can break it.
There are other patterns which I can work on later, some of which are described here: https://holy-city-audio.gitbook.io/...1-assembly-code-generated-by-spincad-designer
DL
I wasn't even planning on working on this, but you know how that goes. Anyway, it looks promising in that:
a) I have figured out a way to scan the generated code looking for patterns which can be optimized.
b) I have come up with the lowest hanging fruit in this area, which is to get rid of the extra instruction that is often used to join two blocks together.

On the left, you see pre-optimized code. The code of yesteryear, one might say. And on the right, you see that 4 instructions have been saved in a very small program. So, this is likely to help most when you have a lot of blocks. And it will help mostly when the blocks are all in a row. And it will help more when the blocks have their input pin as the first instruction. Like in this design:

I should remind you that NOT ALL BLOCKS have their input as the very first instruction. But many do!
I'm going to hammer on this a bit more and then make a beta available to see if anyone can break it.
There are other patterns which I can work on later, some of which are described here: https://holy-city-audio.gitbook.io/...1-assembly-code-generated-by-spincad-designer
DL