Python 3.5 vs. 3.6 what made “map” slower compared to comprehensions
问题 I sometimes used map if there was a function/method that was written in C to get a bit extra performance. However I recently revisited some of my benchmarks and noticed that the relative performance (compared to a similar list comprehension) drastically changed between Python 3.5 and 3.6. That's not the actual code but just a minimal sample that illustrates the difference: import random lst = [random.randint(0, 10) for _ in range(100000)] assert list(map((5).__lt__, lst)) == [5 < i for i in