From 93e1bd9ba0f5357fbe56e82ff4703a93f3b325ce Mon Sep 17 00:00:00 2001 From: pca006132 Date: Sun, 23 May 2021 13:30:00 +0800 Subject: [PATCH] coredevice.comm_kernel: improved byte list performance. --- artiq/coredevice/comm_kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/comm_kernel.py b/artiq/coredevice/comm_kernel.py index 723330798..cdb54a118 100644 --- a/artiq/coredevice/comm_kernel.py +++ b/artiq/coredevice/comm_kernel.py @@ -66,7 +66,7 @@ def _receive_list(kernel, embedding_map): tag = chr(kernel._read_int8()) if tag == "b": buffer = kernel._read(length) - return [bool(a) for a in buffer] + return list(struct.unpack(kernel.endian + "%s?" % length, buffer)) elif tag == "i": buffer = kernel._read(4 * length) return list(struct.unpack(kernel.endian + "%sl" % length, buffer))