itemgetter is faster than using lambda specifically because all the operations are performed on the C side. I should have clarified when I made my response. Thanks for the shoutout!
I teach computer science to undergrads and write for The Renegade Coder. I'm most likely taking care of my daughter, watching the Penguins, or reading manga.
Location
Columbus, Ohio
Education
B.S. in CE from CWRU 2016; M.S. in CSE from OSU 2020; PhD in EED from OSU 2024
itemgetteris faster than usinglambdaspecifically because all the operations are performed on theCside. I should have clarified when I made my response. Thanks for the shoutout!Thanks for the clarification! I wasn't aware of that. The article has been updated to include a note about performance.