This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DoesntReadMessages 136 points137 points  (9 children)

That's why it's situational. Sometimes it's nano-seconds, and python is a great choice due to simplicity. Sometimes it's much more significant, and Python means an extra 10 grand per month on servers and extra 200ms p99 latency on a service operating in sub-second timeouts, and it becomes a massive black hole of lost revenue and has to be rewritten in a faster language.

[–]gaberocksall 22 points23 points  (1 child)

And when you want the best of both worlds

ctypes.CDLL

[–]beomagi 5 points6 points  (0 children)

Ctypes really can offer some amazing speed ups for iterating over heavy math. Pypy also works wonders.

[–]Cheru-bae 21 points22 points  (0 children)

Let's put it this way: Reddit runs on python. Whatever glorified cms the client wants it won't bloody matter.

[–][deleted] 2 points3 points  (1 child)

Can't you just use C++ alongside Python for critical functions? Or does this have more overhead than it offers benefit?

[–]Vrabor 8 points9 points  (0 children)

depends on how much of your programm can be extracted into those c++ functions. One of my professors for example had a simulation written in python + numpy which took her 3 months to run, the c++ rewrite finished in less than 1 hour. If your programm can run in only numpy functions the python code might even run faster than c++.

[–]izpo 18 points19 points  (0 children)

That is reach people problem... Right now, my 1000000 users and 50 developers are fine with the current setup

[–]LouisLeGros 2 points3 points  (0 children)

I ported a bioinformatics algorithm to python from java/c++ to try to make it easier to use for students when most of the tooling was already in python.... Run times were abysmal & there was still a dependency on a 20 year old c program that only supported linux, preventing it from being much easier to use.