3 ms·
There's no need to mentally differentiate between all those approaches when writing code with Python's scientific stack. In practice, code is initially written
by cs702 9y ago
There's no need to mentally differentiate between all those approaches when writing code with Python's scientific stack.
In practice, code is initially written with relatively little regard for how it affects the performance of Numpy and other libraries like it, and then, afterwards, and only if necessary, these techniques are used to optimize those lines of code that prove critical to performance, typically only a small fraction of all lines.
However, if you're working on a project for which every line of code is performance-critical, then I would agree with you, Python would not be a good choice for that.