Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
coolq48207yPython is slow, yes.
But to say that makes the language useless, or to shame the language because of that completely misses the point. -
I do DevOps. The current trend in the web world is to just throw more hardware at the problem. There was this project I supported once. It was python and it had to support 1k concurrent users. I gave it 5 EC2 c4.xlarge instances.... 5 and latency was through the roof!!!!
-
@irene it is slow. But we should argue, do we need that kind of speed for what we are making? If speed is not needed, then why increase development time? Most of the time running time of a program and development time are trade-offs. I may not like python but I definitely acknowledge how it is has removed certain complications from programming.
One thing especially amazing is how we are making programming more and more available to the general public. This is double edged sword though. Because , imho, it's reducing the respect for programmers at the same time. -
Such truth!
Now we have to wait on networking and cloud based apps and memory hogs and a million umpteenth layers of abstraction ad nauseum. Simple optimization is eschewed in favor of rapid prototyping and updates of early release but very buggy software. Miss the good old days of responsive stuff and the web without the fancy animations. -
Wozza638687yThe languages themselves are fine, it's the people using them for the wrong kind of projects. Python is an awful language to work with for large projects so it shouldn't be used for it anyway. But for small applications it's excellent!
-
Excuse me? If you want speed, use C. If you want readability, use python.
If you want both? Well, go and build that unicorn yourself.
Seriously, it's like people are scared to use more than one language in a project. They're just tools. You wouldn't build a house with nothing but screw driver. -
@evilmupp3t python doesn’t have the monopoly on readable code. You can make readable in any of the popular languages without Python’s dogma.
There is a reason why python libraries aren’t usually written in python. -
It's not so much about the languages, it's about the habit of stacking layers of frameworks and packages, and doing things in the wrong places.
So many application devs who embed a full web browser to show two buttons.
So many frontend devs who just do "select * from table" on the server and filter through the data in React.
So many product owners where feature requests always have priority over simplification and refactoring.
Most of the products that I stopped using over the years, the reason wasn't that they were missing a feature... it was because they kept piling on features until their app was an ugly sloppy slow mess. -
@bittersweet just throw more hardware at it till the problem “goes away”
At a previous job, there was an issue of sql queries taking 15-20 minutes to run. DBA said that they needed to be tuned, the boss just got an nvme ssd and the queries started to return instantly....
There’s just no incentive to write optimal code in web dev. We live in an era of launch fast and IaaS where you can config compute properties on the fly. -
Python doesn't need to be slow (and neither does Javascript). If you do it right, there's no good reason that a page written in e. g. PHP is significantly faster.
In most cases it's just a massive collection of frameworks (especially with js) that shows things down. But even if you're using those frameworks you don't have to run into trouble if they are done in the right way.
FYI: Massive sites like YouTube are written in python. If it was inherently not scalable they would surely have migrated by now. -
@theCalcaholic that’s why google invented go. Even devout python evangelists like Dropbox gave up and switched to go
-
@windlessuser Go is nice, I don't question that (worked with it myself), but it's not the one answer to all problems.
-
@theCalcaholic but does extremely well for the webdev problems you’d tackle in Node.JS - even its creator says go is better for the job- or python. If it weren’t for tensorflow and other ml libraries, go would have achieved dominance already
-
@windlessuser I don't think so. ML wouldn't prevent something from doing their web application in go (I'm doing ML myself).
For nodejs the main advantage are isomorphic apps. But it's debatable is that's really worth it. -
disolved5287yIf you want python to be fast, just use the PyPy implementation: There are some cases where the difference is ludicrous.
-
@disolved yeeees, but executing at C speed requires you to circumvent dynamic lookup, which is done by implementing the parts that need to run fast in C and bind it with cython, for example.
-
@windlessuser I cracked up when you said python libraries aren't written in python 😂😂
-
@localghost127 yeah python libraries tend to just be facades around c/c++ stuff. Usually. More often than you’d think actually
-
disolved5287y@windlessuser it doesn't make any sense to say that python libraries are «facades» around c/c++. Python itself is a facade around c/c++. Even PyPy, which is a python implementation of python (google it), is ultimately translated to C before being compiled.
-
@disolved yeah pythons interpreted, but I think what @windlessuser was saying that the libraries themselves aren't written in python. A lot of it being written in c and c++. I think the difference is that interpretation will have some redundancies whereas a direct implementation won't have them and will be very efficient.
-
disolved5287y@localghost127 «a direct implementation wont have them and will be very efficient»: PyPy is proof of the oppside being possible. It is written in Python, yet it is much faster than the original C implementation.
-
Yeah I’ve deployed enough python apps for people to be aware of this annoyance. Hunting for dependencies when your distros package manager doesn’t have them. Pip just assumes you have them and will just fail until you get them
All and github pages tend to not list everything it needs...ugh.
Deploying python is rather painful. -
@disolved No no, it's quite welcome. This pypy fact eludes me; can you provide some readings so I can learn about this?
-
@windlessuser been there. I had a project which required the python 3 version to be installed and when I compiled the source, it only allowed python2 because for some reason my python 3 didn't have some dependancies but my python 2 did. From there it was virtual environment hell and using only pip3 to install stuff. I am not that proficient in python never having learnt it and the above worked for me, so I just rolled with it.
-
disolved5287y@localghost127 which fact? My claim that it is faster than CPython? This old stack overflow thread was my first google result, and it (in combo with linked sources) explains how and why fairly well I guess! https://stackoverflow.com/questions... If you google pypy vs cpython benchmarks you'll get a lot of independent sources (bloggers etc) showing you their experiments and results backing up the fact. Cython (different from CPython) beats pypy in many of these benchmarks, but Cython has its own compatibility issues as I understand it.
-
@disolved thanks for that! I initially had a misunderstanding that it was faster than c. The answer does provide a very carefully created example in which this indeed is the case.
Learn something new everyday! -
disolved5287y@localghost127 Yeah sorry, I should have written «the original C implementation of Python», the two last words there being an important detail 😅 haha
Related Rants
Looking squarely at you js, python Devs
joke/meme
js
horrible code
python
slow af