Attention is currently required from: kirr.
lynxis lazus has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39534?usp=email )
Change subject: trx_toolkit/transceiver: Do not scan tx_queue twice on tx path ......................................................................
Patch Set 1:
(1 comment)
File src/target/trx_toolkit/transceiver.py:
https://gerrit.osmocom.org/c/osmocom-bb/+/39534/comment/ec1ab21d_5bba661e?us... : PS1, Line 315: self._tx_queue_lock.acquire()
It should be faster if you would do this as 3x list comprehensive: […]
The strange thing is, with %timedif what you've used with ipython, it is much slower.
testvec = [ x for x in range(1024)]
In [18]: %timeit do_diff(testvec) 47.3 μs ± 180 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
In [19]: %timeit do_forloop(testvec) 34.9 μs ± 147 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
while with cProfile it was one order of magnitude faster.