4 ms·
I think you missed the point. There are plenty of use cases where Python isn't the cause of slowness. It doesn't matter if C is 100x faster than Python if your
by scott_w 14y ago
I think you missed the point. There are plenty of use cases where Python isn't the cause of slowness.
It doesn't matter if C is 100x faster than Python if your app is running 49/50 seconds running SQL queries.
- coldtea 14y agoNo. But it DOES matter to me than Python restricts you to using it for those cases, whereas I would want (and could technically be able to) use it for far more stuff.
- pekk 14y agoSo you prematurely optimize Python out of everything you write, because it might not be suitable for... some use case yet to be determined?
- coldtea 14y agoNo, I don't "prematurely optimize Python out of everything I write". The exact opposite, I would like to be able to use Python for more stuff but I can't because it's slow. Nothing about doing it "prematurely" here. I have tried it for specific problems and it was slow. If anything, having built in in Python first is the reverse of "prematurely". And I have, as many programmers have, a very good general idea of where it's slow and what it can be used adequately for without resorting to C. And what I argued is that people constrain themselves unconsciously, based on that very knowledge, to the kind of projects they do with pure Python. Nobody writes a AAA game in Python. Nobody tries to build a browser in Python. Nobody writes a performant Apache/Nginx class web-server in Python. Nobody writes a database engine in Python. Etc etc. (Note for the "Vulcan"-style literal readers: by "nobody" here I mean "not many" / "not a sane person". I'm sure you can find some experimental, bug ridden, half-developed example of all of those done in Python, with maybe 100 users at most. Oh, and I specifically wrote: "pure python").
- deleted 14y ago[deleted]
- voltagex_ 14y ago>Nobody writes a AAA game in Python. No, but the scripting/UI/mod toolkit for the game might be in Python >Nobody writes a performant Apache/Nginx class web-server in Python No, but Python can do quite well serving WSGI to Nginx >Nobody writes a database engine in Python No, but Python ORMs work pretty well. The point I'm trying to make is that I don't think that it's a bad thing that Python sometimes gets relegated to a "support" language. I think the time of the single language programmer is over. If you need something faster than Python, use something else.
- coldtea 14y ago>The point I'm trying to make is that I don't think that it's a bad thing that Python sometimes gets relegated to a "support" language. Of course it is bad. It would only be good if the inverse (being able to write the whole thing in Python and get the same speed) would be worse. But it clearly is not -- hence, it's bad. It might be pragmatic and necessary compromise at the moment, but that doesn't make it "not bad". >I think the time of the single language programmer is over. If you need something faster than Python, use something else. On the contrary, multi language projects are a kludge born out of (pragmatic) necessity. Nothing inherently inevitable (or good) about them.
- pwang 14y ago> On the contrary, multi language projects are a kludge born out of (pragmatic) necessity. > Nothing inherently inevitable (or good) about them. Um, except that coherent planes/tiers of abstraction is the foundation of robust software engineering. You write languages to a spec; compiler authors emit bytecodes for another spec; hardware engineers optimize transistors and lay traces on silicon to meet yet another spec. Etc. Multi-language is the only thing that makes the world work today. The closest single-language runtime that exists is FORTH and things like that. Every other "modern" language where you get to pretend your process has a contiguous address space, or that there even exists a thing such as "process", is s pragmatic compromise between compiler and runtime technology.