I have a need to create a list of combinations of numbers. The numbers are quite small so I can use byte rather than int. However it requires many
Some of your numbers fit entirely on an integer nuimber of bits, so you can "pack" them with the upper level number :
for (byte lm = 0; lm < 12; lm++)
{
...
t[z].l = (lm&12)>>2;
t[z].m = lm&3;
...
}
Of course, this makes the code less readable, but you saved one loop. This can be done each time one of the numbers is a power of two, which is seven time in your case.