1. 9
  1.  

  2. 2

    Listing Python’s strength as being computationally efficient seems non-intuitive, but it’s true. In common usage, Python is really just a high level scriptable linker for optimized C/C++ packages and Java/Scala applications (e.g. Spark). Python will take you a very long way in terms of scaling.

    1. 1

      For some things that’s true, but I’ve found it fairly brittle. You really have to find a built-in library function that does exactly what you want. Performance tanks as soon as you have to do anything on the Python side. NumPy in particular is full of gotchas if you don’t think carefully about the execution model. Some numpy functions take a Python function as a parameter (key functions, custom filter functions, etc.), and there are conveniences like numpy.vectorize, but any of these kill your performance, because they’ll end up doing Python function calls in an inner loop, and Python function calls are very slow.

      1. 1

        The numpy.vectorize example is a straw man. The docs are very clear that it’s not performant.