3 ms·
> in less than 8ms on a single core dev instance. Python is plenty fast for many things. What’s that, nowadays? 25 million cycles, 75 million instructions? Py
by Someone 4y ago
> in less than 8ms on a single core dev instance. Python is plenty fast for many things.
What’s that, nowadays? 25 million cycles, 75 million instructions?
Python isn’t plenty fast, modern hardware is.
- pdonis 4y agoMore precisely, modern CPUs are so much faster than network or file I/O that if your program has to wait on I/O, the CPU is going to sit idle most of the time anyway, so trying to optimize CPU time is pointless. The GP's use case is an example: he's capturing HTTP headers, so the bottleneck is network I/O, not CPU. So Python for his use case is, as he says, plenty fast. For use cases where CPU is the bottleneck, such as numeric simulations, Python users reach for something like numpy, where all the CPU intensive stuff is being done in C extensions, not Python bytecode.
- KyeRussell 4y agoThe person you’re replying to is saying that Python meets their needs. Judging by what they’ve said about their use case, I doubt it’s a meaningful affirm to their overall pipeline. Your counterpoint is that it’d be slower if it were running on a Pentium 4. Do you honestly think that they don’t know this? Yes, this is precisely the point. Things are at a point where Python’s benefits are worth more than what another language would bring in speed improvements. I imagine that there would be less of a benefit to busses if we had to Flintstone them everywhere instead using a combustion engine. That’s not the current reality though.