5 ms·
There was a different similar post a few days ago from Facebook and this one stems from Dropbox and they both are said to make Python code run faster. I think
by ThinkBeat 5y ago
There was a different similar post a few days ago
from Facebook and this one stems from Dropbox and
they both are said to make Python code run faster.
I think the obsession with monocultures is unhealthy.
Python is a great language.
It is reasonably easy to learn, somewhat readable if you dont yet.
It is one of the most popular programming languages on the planet.
But it was not created to produce the fastest code possible.
There are other programming languages that are focused on speed.
Perhaps for the most critical parts use one of them.
Python can integrate pretty well with C with some magic i hear-
(Never tried it myself).
One programming language will never cover all use cases and they
should not have to.
Every programing langue is not made to be "functional" but they can
be tortured into it.
Every programming language is not object oriented, but they can be tortured
into it.
Every programming langue is not focused on being the fastest on execution
but they can be tortured into it.
There is a reason carpenters have more than one tool to build something.
For the longest time I programmed in C with some C++ mixed into it.
It is a great language. There are many problem domains I would not
recommend using C.
I think it was delightful ot pickup Python many years ago.
It is great. I can be very productive in Python in contexts were
Python is great.
It is not C, it should not want to be.
Now I am picking up Elixir, I am learning a lot.
It is neither Python or C and I am happy with that.
use proper tool for the job at hand
e to https://github.com/facebookincubator/cinder https://github.com/facebookincubator/cinder
reply
- gravypod 5y agoSuppose you are staring a startup. You know and like python so you build your MVP in python. 1k to 10k lines later you hire a few extra engineers to help bring your MVP to a real product. 100k to 1mill lines later you become very very successful and you now have 10s to 100s of engineers coding every day. They're all producing the same number of LOC you were. Maybe more now. Then you take a look at your bills and find that what used to run on a single box on your basement is now costing > 100k/month in compute. So what do you do? Rewrite everything in C++? Well you can start but you have so much software it's hard to do. Maybe you can save a few percent of compute cycles across all of your code? Reduce the 100k/month to 80k/month. Obviously this number is fall smaller than it would be in reality.
- guenthert 5y agoYou do what you generally do with performance challenges: you profile and improve the hot-spots. Rewrite those parts if necessary. Rewriting everything for performance reasons is silly. If you decide to rewrite everything, it would be for other reasons (e.g. maintainability, long-term viability, etc.)