Hi,
I was wondering what's the performance difference on the CLA between float comparison and integer comparison ( int, uint, enum etc... ). Is there a big hit? Which documentation would suit me best to answer this question.
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Mosin,
If you refer to the instruction set for the CLA you get an idea for which assembly functions are available for comparisons and their cycle counts.
Float compares are single cycle instructions, signed 32-bit integer comparisons are also single cycle, unsigned is not supported on the C compiler
signed 16 bits are loaded to a working register using the MMOVIZ instruction and the comparison used is 32 bit so no penalty is incurred..and im guessing enums fall in this category(probably 32-bit signed compare, will have to check on this)
Looks like support for unsigned compares has been added as of 15.9.0.STS, but it will likely be inefficient as there isn't an assembly instruction to do unsigned compares, only signed compares, so it must require multiple instructions (cycles) to compute and reach a decision.
If i recall there should also be an accompanying advisory that basically warns of its inefficiency - is that the case?