papi: vpp_serializer.py - replace slow bytes() with fast bytearray() 08/36308/7
authorViktor Velichkin <avisom@yandex.ru>
Tue, 31 May 2022 19:12:15 +0000 (22:12 +0300)
committerBeno�t Ganne <bganne@cisco.com>
Wed, 1 Jun 2022 14:36:40 +0000 (14:36 +0000)
commit7c3096dac7c96b0c9b0667dcf237f6f9a21c1505
tree04b50727df8a0da92e34b25a5d3905fcf70e62f1
parent321bd106a64bdd6c051579f58e111f71c2c7e7d6
papi: vpp_serializer.py - replace slow bytes() with fast bytearray()

https://docs.python.org/3/library/stdtypes.html

"if concatenating bytes objects, you can similarly use bytes.join() or io.BytesIO, or you can do in-place concatenation with a bytearray object. bytearray objects are mutable and have an efficient overallocation mechanism"

Type: improvement

Signed-off-by: Viktor Velichkin <avisom@yandex.ru>
Change-Id: Id20d337f909cce83fcd9e08e8049bb0bf5970fbc
src/vpp-api/python/vpp_papi/vpp_serializer.py