performance - python: Is it better to have one proper for loop or several oneliner for loops -
i have several lines of python code this:
myvar1 = np.array([d['key1'] d in d[0]['log']])
all keys/values have same length.
is better (performance/cpu/memory) make single loop , import them, or better several 1 liners?
what think?
you can use timeit
, measure it.
Comments
Post a Comment