OT: why do people use python when it is slow?

Ola Fosheim Grøstad via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 14 11:33:19 PDT 2015


On Wednesday, 14 October 2015 at 15:49:20 UTC, David DeWitt wrote:
> I agree but the quora question ask why it is popular despite 
> being slow and this is the reason.  If you are doing tasks that 
> are computationally expensive in Python then yes it will be 
> slow but Python is popular largely because of their web 
> frameworks and support.

If it is slow then one can configure the load balancer to give 
more resources to that URL, or even run it on an insanely fast 
compute node with lots of memory for caching/memoing.

Or just implement that single high frequency URL handler in a 
different language if it scaling up resources become costly.

> You pick the right tool for the right job maybe D and maybe 
> Python and this doesn't mean your results will be slow.

Yes, you pick the right tool for the job, and in a web context 
that means picking a tool that has infrastructure support and 
makes it possible to cover future unexpected needs in a cost 
efficient and timely manner where you offload as much maintenance 
costs as possible to the infrastructure maintainers rather than 
the application maintainers.

I use AppEngine and Python is by far the most pleasant choice 
when choosing between Java, Go, Php and Python. For many very 
good reasons. But you can use whatever language you want for any 
particular URL so using Python is not a lock-in solution.

Using Rust or D for web developement do imply lockin on many 
dimensions (infrastructure, libraries, people, maintenance) 
compared to Python, Java and Ruby.



More information about the Digitalmars-d-learn mailing list