Comment on The C programming language is like debating a philosopher and Python is like debating someone who ate an edible

<- View Parent
squaresinger@lemmy.world ⁨12⁩ ⁨hours⁩ ago

Perfect C is faster than perfect Python, same as perfect assembly is faster than perfect C.

But in the real world we don’t write perfect code. We have deadlines, we have constantly shifting priorities, we have non-technical managers dictating technical implementations. We have temporary prototype code that ended up being the backbone of a 20 year project because management overpromised and some overworked developer had to deliver real fast. We have managers still believing in the mythical man month (“If one woman can make a baby in 9 months, 9 women only need a single month to make one”) and we have constant cycles of outsourcing and then insourcing again.

With all that garbage going on we end up with a lot of “good enough for now”, completely independent of “laziness” or “low-skill” of developers. In fact, burnout is incredibly common among software developers, because they aren’t lazy and they want to write good software, but they get caught in the gears of the grind until they get to a mental breakdown.

And since nobody has the time to write perfect code, we end up with flawed and suboptimal code. And suboptimal assembly is much worse than suboptimal C, which is again much worse than suboptimal Python.

If your Python code is suboptimal it might consume 10x as much RAM as it needs. If your C code is suboptimal, it memory-leaks and uses up all RAM your PC has.

If your Python code is buggy, something in the app won’t work, or worst case the app crashes. If your C code is buggy, some hacker just took over your PC because they exploited a buffer overflow to execute any code they want.


The main issues with software performance are:

source
Sort:hotnewtop