3 ms·
> Just FYI this specific wisdom you're suggesting is exactly backwards, or at least could be depending how how you read it. Yeah. map is usually faster if you
by masklinn 8y ago
> Just FYI this specific wisdom you're suggesting is exactly backwards, or at least could be depending how how you read it.
Yeah. map is usually faster if you already have a function to invoke (especially if that function is a builtin or in C). If you have an expression and have to wrap it in a lambda to get it in map, it's going to be way slower than the listcomp because all things considered CPython's function calls are expensive.