Performance decreases from 4.2 to 4.3 on EMX

I have a huge application that runs on EMX and 4.2 SDK. I have hand tune the code to have the best performance in terms of runtime. The code is composed of a while loop that checks button states, analog/digital inputs, many UARTs, can bus…

This loops was runing at 300ms per iteration on 4.2. Now on 4.3 it runs at 1s per iteration…

Do you observe the same on your application and platforms? Does anyone have solved that?

Here’s a comparison of practically the “same” code in terms of runtime:


RTC in,24634, micro seconds                                 RTC in,24679, micro seconds
BPC in,5227, micro seconds	                                BPC in,9852, micro seconds
OW detection in,350, micro seconds                      OW detection in,626, micro seconds
OW in,22174, micro seconds                                  OW in,39539, micro seconds
BUZ in,290, micro seconds                                     BUZ in,466, micro seconds
BUZEX in,189, micro seconds                                BUZEX in,547, micro seconds
LED in,189, micro seconds                                     LED in,222, micro seconds
ANS in,7787, micro seconds                                  ANS in,9772, micro seconds
DNS in,5138, micro seconds                                 DNS in,6693, micro seconds
REL in,237, micro seconds                                  REL in,224, micro seconds
NMEA in,1915, micro seconds                                 NMEA in,3185, micro seconds
IMU in,4572, micro seconds                                 IMU in,5370, micro seconds
buzoo in,189, micro seconds                                 buzoo in,224, micro seconds
Computed data in: 21434, micro seconds             Computed data in: 17722, micro seconds
Can sentence inputs in: 617, micro seconds         Can sentence inputs in: 857, micro seconds
Can ana input,289, micro seconds                        Can ana input,558, micro seconds
Candig input,270, micro seconds                           Candig input,336, micro seconds
Evaluates instructions in : 136812, micro seconds   Evaluates instructions in : 229199, micro seconds
powoo in,807, micro seconds                               powoo in,1087, micro seconds
rellevel in,400, micro seconds                               rellevel in,645, micro seconds
Evaluates buzoo in: 449, micro seconds               Evaluates buzoo in: 729, micro seconds
Evaluates logs variable in: 1330, micro seconds      Evaluates logs variable in: 2735, micro seconds
send data to can and CC in: 11955, micro seconds       send data to can and CC in: 37665, micro seconds
Manage CC in: 20715, micro seconds                       Delay to manage each line sent by the CC: 1153, micro seconds

On left the code running on 4.2, on the right side, the code running on 4.3

Try this please

https://www.ghielectronics.com/community/codeshare/entry/597

@ leforban -

Don’t use USB power without attaching debug.

First run: 25 min 50s for the 4.3SDK vs 24min 51s for the 4.2 version.

The new sdk seems slower but not at the same proportion that I observe. However the bench is computation intensive while my application is more control intensive (even if there’s string analysis… and some computation tasks…)

I am comparing results using the debugger attached.