LD's tests done with a Siemens S71512SP (optimized block access)
Results:
1: //indexed multiply with nonzero data  434ms
2: //non indexed multiply with nonzero data  557ms
3: //some trig functions  498ms
4: //non indexed multiply with nonzero data, more calcs, for loop smaller  455ms
5: //non indexed divide with nonzero data  540ms
6: //non indexed multiply with zero data  320ms
7: //Boolean logic  54ms
8: //Bitwise operation  51ms
9: //bubble sort  1250ms
Again, due to the memory requirements I had to reduce the array sizes and extrapolate the results.
edit: I think that Kamenges is right, that in test 3 (and possibly some of the other tests) the TIA compiler detects that the variable doesnt get changed, so that it is a defacto constant, and thus optimises the code by substituting the calculation by a simple value assignment of the result of the formula.
edit again: That could mean that the tests should be reviewed and possibly changed to avoid that from happening. Otherwise the test results are skewed.
__________________
Jesper
See my profile interests for Q&A
Last edited by JesperMP; June 12th, 2019 at 11:31 AM.
