18

The lower the level language, the more concerned I am with performance for some reason...irrational I know.

Programming in C: oh no I have this extra if statement which may have to copy the 16 byte struct.

Programming in Python: oh hey I can simplify the logic if I write a class to dynamically build this regex, compile it, and search through a 1MB text file.

Comments
  • 17
    If performance were important for your code parts, you wouldn't use Python in the first place, would you?
  • 2
    Same. Although to be fair I wouldn't ever use C for something that has more than 20ms to return or as glue for such, so it kinda makes sense.
  • 1
    I think part of the problem is that you have so much control you want to take advantage of it. More than the situation dictates.
    When confronted with memory management I want to do it well. In python you don't have much influence on it so you focus on the problem at hand and make the best structured solution.
    The other part is indeed mentioned by the rest. You go for more level because performance matters so you have to optimize or do it out of habit.
    Some one else have another reason?
  • 1
    @Fast-Nop I'm certainly not stating to choose Python over C (or vice versa) when performance is critical. Each one has its use cases where it should be used.
  • 1
    @BobbyTables Even Python drops to C when performance matters, like the heavy lifting parts of NumPy. I think that's a clever mix.
Add Comment