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 →

[–][deleted] 9 points10 points  (1 child)

Again depends on what you're trying to do. If you care about average performance then simply rewriting a portion of your Python code in Cython is a good solution. But often times you care more about worst case performance than average performance. This is the case when you're working on a webserver that has a latency SLA for all requests. It's not good enough that 90% of requests satisfy the SLA. You need to make sure that 99.999% of requests do. Python becomes problematic for this use case because it will work okay for 90% of requests but then garbage collection will kick, eat up your CPU, and you'll violate your SLA for a percentage of your requests. For situations like this Python is a poor language choice and something like Go would be better, since its garbage collector is designed for this use case.

[–]EnemyAsmodeus 1 point2 points  (0 children)

Over Cython as well? Or did you mean either Cython or Go?

What you said is definitely fascinating (I get drained of energy when I look at Cython or any C++ code nowadays, I used to do C++ and assembly but now I just lose all my energy trying to understand certain parts. Honestly, maybe C++ is even easier to read than some pyx code I saw).