I did a test which show the performance of my cpu board by 1 million times multiplication.
First I did it directly in vxworks by c language. It spent 2500us on finishing the multiplication.
Then I make a external library by c language. It spent about 11666us on the test.
I don't know why the performance is so poor when I do it by codesys.
How can I improve the performance?
I did a test which show the performance of my cpu board by 1 million times multiplication.
First I did it directly in vxworks by c language. It spent 2500us on finishing the multiplication.
Then I make a external library by c language. It spent about 11666us on the test.
I don't know why the performance is so poor when I do it by codesys.
How can I improve the performance?
the code just like below:
void CDECL CDECL_EXT func1__main(func1_main_struct *p)
{
UINT32 startTick, endTick, multipIntTick;
INT32 index, cycles;
INT32 i;
}
Watch out for this code, a decent c compiler might inline that to the following, however the CodeSys compiler will not!
After inlining
Hi Andreaz
do you mean it will be faster after inlining
The test code is for a external library, so it is compiled by gnu of vxworks.