Chris said " If you actually profile and find that something-or-other is a bottleneck, chances are you can break it out into a function with minimal loss of clarity, and then reimplement that function in C (maybe wielding Cython for the main work). That doesn't compromise clarity. "
Well, I'm not going to go back and forth saying "does too, does not" with you. I have a 7 year old for those sorts of arguments. And I think we are saying more or less the same thing. I agree that isolating your bottleneck to the tightest possible subroutine usually doesn't compromise clarity. But once you are re-implementing the bottleneck in a different language.... esp a language notorious for high performance nuggets of opaqueness... that does compromise clarity, to some extent. (Does not, does too, does not, does too, ok we're done with that part) But this sort of bottleneck refactoring can be done in a careful way that minimizes the damage to readability. And a strength of py is it tends to encourage this "as pretty as possible" approach to bottleneck refactoring. This is what you're saying, right? -- https://mail.python.org/mailman/listinfo/python-list