I took a crack at it: https://gist.github.com/secemp9/16a65c98d8c15be858ed2276015047f1 seems like Miyagi is right in saying list comp is faster, but only for a specific version pair of pandas and numpy (both on 3.8.10): Python: 3.8.10 numpy: 1.24.4 pandas: 2.0.3
{'loop': 21.9099904, 'apply': 4.764312799999999, 'itertuples': 0.4603243999999975, 'list_comprehension': 0.20237750000000077, 'numpy_vectorize': 0.14856430000000032, 'direct_vectorize': 0.008104400000000567}
Here vectorize is faster than lisp_comp, but the fastest is still direct_vectorize (at least for current dataset I tried it on)