Hello
Luigi,
Using the code you provided, I created a performance test to measure the execution time consumed by each process. For a more comprehensive comparison, different numbers of calls were made to both the Harbour and C processes, and the execution time for each was recorded.
The results are attached below.
Speed comparison: lw_NormalizeAngle vs LW_NORMDEG360
======================================
Process calls: 100,000
Time Harbour: 0.05300000 seconds
Time C: 0.03700000 seconds
Relation C/Harbour: 1.43 times faster
Press any key to continue...
Speed comparison: lw_NormalizeAngle vs LW_NORMDEG360
======================================
Process calls: 1,000,000
Time Harbour: 0.50600000 seconds
Time C: 0.36000000 seconds
Relation C/Harbour: 1.41 times faster
Press any key to continue...
Speed comparison: lw_NormalizeAngle vs LW_NORMDEG360
======================================
Process calls: 10,000,000
Time Harbour: 4.91200000 seconds
Time C: 3.54500000 seconds
Relation C/Harbour: 1.39 times faster
Press any key to continue...
Speed comparison: lw_NormalizeAngle vs LW_NORMDEG360
======================================
Process calls: 100,000,000
Time Harbour: 48.63400000 seconds
Time C: 35.42000000 seconds
Relation C/Harbour: 1.37 times faster
Press any key to continue...
Speed comparison: lw_NormalizeAngle vs LW_NORMDEG360
======================================
Process calls: 500,000,000
Time Harbour: 249.18900000 seconds
Time C: 180.09000000 seconds
Relation C/Harbour: 1.38 times faster
Press any key to continue...
Best regards,
Marcos Jarrin