Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
If performance were important for your code parts, you wouldn't use Python in the first place, would you?
-
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.
-
hjk10156965yI 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? -
@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.
-
@BobbyTables Even Python drops to C when performance matters, like the heavy lifting parts of NumPy. I think that's a clever mix.
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.
random