4 ms·
I have Python analytics capturing HTTP Headers, processing them, and finally storing them in less than 8ms on a single core dev instance. Python is plenty fast
by shanebellone 4y ago
I have Python analytics capturing HTTP Headers, processing them, and finally storing them in less than 8ms on a single core dev instance. Python is plenty fast for many things.
Also, I love the syntax. It reads like a sentence.
- 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.
- iLoveOncall 4y agoThat sounds insanely slow. I think it's fine to like Python as a scripting language, but arguing that Python is fast is simply laughable. I forsee Python's reputation going the way of PHP's (< 5, not modern), and statements like this will definitely contribute to it.
- shanebellone 4y agoLet's have a contest then. Pick a (relatively simple) web product and your "fastest" language. I bet I'll build it faster with pure Python.
- iLoveOncall 4y agoThere's no need for a dick measuring contest, there are plenty of life-like benchmarks available online that show Python is agonizingly slow. > I bet I'll build it faster with pure Python. What? We're talking about runtime speed, not development time...
- shanebellone 4y agoYou said: "That sounds insanely slow." Anti-up.
- deleted 4y ago[deleted]