Mark Lewis
1 min readMar 15, 2022

--

Thank you for taking the time to write this. I have two addendums. First, don't pick Python for a project that will be CPU intensive (unless there is an existing C/C++ library you can call to do all the CPU work). Second, you often can't be certain that a project won't grow or won't become CPU intensive. Projects have a tendency to grow and you often don't know what might be patched onto a project in the future. For this reason, I'd argue that starting with Python is always a risky decision because you don't know what the future holds for your software.

I'm currently working for a FAANG company and my group has a package that was written in Python. My guess is that this seemed fine when the package was first created. The main functions of this package are to start other processes and Python is a good glue language for that type of thing. However, over time other requirements were added, including an element that is CPU intensive. This part has been causing a lot of problems recently as we scale up and trying to make things go faster in Python is a lot harder than it would be in other languages. In addition, this is running in the cloud, so we are paying for those clock cycles. Had a different language been chosen to start with we would have lower cloud bills and an easier path to optimization, but doing a complete re-write at this point isn't an option.

--

--

Mark Lewis
Mark Lewis

Written by Mark Lewis

Computer Science Professor, Planetary Rings Simulator, Scala Zealot

Responses (1)