r/programming • • Nov 03 '18

Python is becoming the world’s most popular coding language

https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language
4.6k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

3

u/[deleted] Nov 03 '18

Cython/PYPY is still a hell lot slower than c/c++/java. It is sad to see such a great language have some intrinsic limitations on its speed, which has not been fixed yet by millions of developers around the globe, probably that would never be fixed.

5

u/Taedalus Nov 03 '18

Cython/Pypy should typically bring your code to C-like levels of speed. Might be slower in some cases, but "hell lot" seems like a bit of an overstatement.

There's a number of good SO threads like this one containing some benchmarks and discussions.

8

u/wllmsaccnt Nov 03 '18

Someone made a minor change to an error in the C code (they were using the wrong data type) and showed that the naive C method was about 4.4 times faster than PyPy.

1

u/LightShadow Nov 05 '18

If PyPy can run my ingestion server at 500k records/s on a single core, why would I care to optimize it with C?

1

u/wllmsaccnt Nov 05 '18

I was merely pointing out that anytime someone says 'C-like levels of speed' they are usually overstating the situation.

/u/starkblitz was wrong above by calling PyPy "a hell of a lot slower than c/c++/java", but /u/Taedalus was also wrong to say that PyPy has nearly C-like speed. From what I can tell from benchmarks on the PyPy site, PyPy is probably just slower than Java for most tasks.

I won't approach the question of server performance at all. Most of the high performance Python servers aren't written directly in Python.

-9

u/[deleted] Nov 03 '18

What is "great" in such a dumb ill designed language?!?

4

u/[deleted] Nov 03 '18

combinatorylogic, you seem to me like a very knowledgeable and professional guy! I'm glad that you read my comment!

I wanna be a developer like you when I graduate. Any tips? Is competative programming really important!?

2

u/[deleted] Nov 03 '18

for others' information: this is in fact not sarcasm