r/programming • • Mar 16 '20

How is computer programming different today than 20 years ago?

https://medium.com/swlh/how-is-computer-programming-different-today-than-20-years-ago-9d0154d1b6ce
5 Upvotes

18 comments sorted by

View all comments

5

u/Objective_Mine Mar 16 '20

Nitpick:

Since we have much faster CPUs now, numerical calculations are done in Python which is much slower than Fortran. So numerical calculations basically take the same amount of time as they did 20 years ago.

The code that implements the numerical calculations has generally been written in C. You just call that code from Python through a Python API. So no, it's not slow. I have no idea why people still think e.g. data analysis from Python is somehow slow because it's Python.

I don't know if it's as fast as something implemented in Fortran but it sure as hell has little to do with the speed of pure Python code.

Otherwise a nice article, the kind that's both occasionally funny and has a few points here and there.

1

u/anengineerandacat Mar 16 '20

Python generally speaking is slow, and whats worse is that it's also one of the slowest languages in it's class (interpreted). It's likely a bit more of a "productive" language though due to it's features.

https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf

Do be mindful this study is about 3 years old though; the gap may of closed a bit since then.

As for floating-point performance; I found this https://www.fourmilab.ch/fbench/fbench.html#results

In short, if one actually cared about runtime performance they should stay quite a bit away from Python; though the above does highlight that using PyPy you do get some significant gains putting it at about 100% overhead from Java.

NOTE: If you know of even more credible sources please comment back and I'll edit this comment to include it.

4

u/Objective_Mine Mar 16 '20

Did you even read my comment?