Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize decoding labels from incoming packets (#1019)
- decode is a bit faster vs str() ``` >>> ts = Timer("s.decode('utf-8', 'replace')", "s = b'TV Beneden (2)\x10_androidtvremote\x04_tcp\x05local'") >>> ts.timeit() 0.09910525000003645 >>> ts = Timer("str(s, 'utf-8', 'replace')", "s = b'TV Beneden (2)\x10_androidtvremote\x04_tcp\x05local'") >>> ts.timeit() 0.1304596250000145 ```
- Loading branch information