mellis
Member
kamenges said:True. However, now the CPU needs to perform a masking operation to get at the bit you want referenced. So boolean operations become a two-step process. With the BOOL data type and take the memory hit the comparison can be performed immediately.
There is very little in the world that comes for free.
Keith
Keith,
I'm not sure I am following this line of reasoning, so please correct me if I'm misunderstanding your intent. I think you are saying something like this...
XIC MyBOOL
executes quicker than
XIC MyDINT.0
or
XIC MyUDT.BoolElement
Is that the basic idea?
Because I don't think it matters one bit to the processor how you entered those addresses, they all resolve to a specific bit address at compile time. I think they execute the same.