Forums

Would pythonanywhere servers be significanly faster than my computer?

Hello,

I have a code that takes some time to run. It processes files and creates some other files and almost all the time is spent in CPU operations because it calculates some things about coordinates.

I wonder if running the code here would be significantly faster? I read on another topic (https://www.pythonanywhere.com/forums/topic/29483/) pythonanywhere uses a CPU with 3.30 GHz, which is like a home computer. My CPU is @2.30 GHz. So, as an estimation, would I get only about a 40-50% reduction in running time? I am of course not asking for a guarantee or a certain prediction. I just want to know if it is worth the effort the move the project here. Maybe there are some things in server CPU's that would make my code run much faster than my estimation of 50%?

You may ask why am I just not testing it, it is because the code is written in another language and I'll convert the code to python for doing this. For this question, we can assume both languages perform the same.

Best wishes.

Server CPU reference: https://ark.intel.com/content/www/us/en/ark/products/75275/intel-xeon-processor-e52670-v2-25m-cache-2-50-ghz.html

I did a small test with matrix multiplications, it took 231 seconds on pythonanywhere and 200 seconds on my computer. :/

In general, things that you run on PythonAnywhere will be slower -- consider that a typical desktop machine might cost about $1,200, and if it was run at 100% CPU all of the time it would last about a year. Server-grade components last about twice as long, but cost about twice as much. So to get the performance of a $1,200 machine you need to pay about $100/month just for the hardware. Add on the cost of electricity, cooling, security, bandwidth, and so on, and it becomes maybe twice that much.

We can offer prices of less than $200/month because the machines that you use are shared with other users, so you will in general get lower performance as a result.