This is more of a delay than speed.
Python always allocates and frees memory, but if the data is reused, the same memory will be reused by the C library. Thus, the OS (C / UDP / IP stack library) will have a greater impact than Python itself.
, RTOS C- .