Re: SDK migration 0.9.5 -> 0.10.0 increase CPU usage
nicolas lantz <nicolas.lantz@...>
Hi,
toggle quoted messageShow quoted text
I confirm that (in my test case) New SDK 0.10.0 toolchain seems to significantly increase CPU usage, the new SDK 0.10.0 Newlib a lot. The details of my investigation below... ------------------------------------------------------------------ Test case ------------------------------------------------------------------ I do CPU average usage test on an audio compression task using the opus codec. ------------------------------------------------------------------ Measures ------------------------------------------------------------------ With CONFIG_SPEED_OPTIMIZATIONS=y SDK 0.9.5 - Newlibc => 51% CPU usage - minimal lib => 58% CPU usage SDK 0.10.0 - Newlibc => 75% CPU usage - minimal lib => 60% CPU usage ------------------ This gives ------------------ CPU usage between SDK 0.9.5 and SDK 0.10.0 with Newlibc : +47% CPU usage between SDK 0.9.5 and SDK 0.10.0 with minimal lib : +3% ------------------------------------------------------------------ Investigations ------------------------------------------------------------------ SDK 0.9.5 is built on newllib 2.4.0 SDK 0.10.0 is built on newlib 3.1.0, But it seem that there is no difference on string function source code (memmove, memcpy, memset), ------------------------------------------------------------------ Assumption (in my test case) ------------------------------------------------------------------ SDK 0.10.0 toolchain reduce the CPU performance vs the SDK 0.9.5 of about 3% Newlibc is compiled differently between the SDK 0.9.5 and the SDK 0.10.0 as it increase the CPU usage of about 47-3 = 44% On SDK 0.9.5 Newlib is more efficient that minial lib of about 58-51 = 7% ------------------------------------------------------------------ Trial : ------------------------------------------------------------------ I replace the source code of the three more used function (memmove, memcpy, memset) in minimal lib with the one from Newlib source. I build my projet with the SDK 0.10.0 ------------------ Measures ------------------ CPU usage : 53% => gain from minimal libc current source code of -13% => gain from Newlib : - 41% => I find the performance I had with NewLib and SDK 0.9.5 with additional CPU usage of about 4% ------------------------------------------------------------------ Suggestions for improvement ------------------------------------------------------------------ - compile newlib differently in SDK - use improved code for the minimal lib Nicolas Nicolas LANTZ M : +33 (0)6 19 07 43 43 T : +33 (0)9 52 96 81 86 www.ubicore.net Le 27/03/2019 à 17:19, nicolas lantz a
écrit :
Anas,
|
|