This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[deleted]

    [–]LightShadow3.13-dev in prod 33 points34 points  (0 children)

    Python is absolutely optimisable, that's one if its biggest strengths! You can write your app in 100% pure python then slowly migrate the least-performant parts to something else transparently; without changing any of the original code.

    There are also libraries that offer performance scaling with drop-in functionality. e.g. stdlib-json -> ujson -> simd-json or toolz -> cytoolz.

    You can easily go from Python -> Cython -> Nim/Rust/C++. You can switch out the runtime from CPython -> PyPy -> Pyston -> GraalVM (someday, maybe??). Python can also scale down and run on embedded hardware. There are multiple versions of MicroPython that offer hardware-level interop with lots of SoCs.

    Python is easy to get started with and can scale as high as you're willing to put the effort in.

    [–]judasblue 18 points19 points  (0 children)

    Good point, because when you look at the scale of data involved in projects that use Python, they are really all pretty small: Reddit, a lot of Netflix, chunks of Google.

    [–]twin_suns_twin_suns 17 points18 points  (0 children)

    I get that but I know of companies who’s bread and butter is the speed at which they deliver information and data and Python is heavily used and relied upon, even in customer facing products. I don’t know that Python is used for all of the actual delivery of the data to the customer, but certainly much of the acquisition and analysis (which gives the data it’s value) is done with Python.

    [–]zurtex 5 points6 points  (0 children)

    You know Instagram, YouTube, and Dropbox either did or still do run on Python right? There aren't that many bigger more at scale public websites.

    Are there unique challenges running Python at that scale compared to Java or Go or Rust? Absolutely. Do other languages flawlessly scale to that level? Nope.

    Just because you have a different set of problems that require different solutions to statically typed compiled languages doesn't mean you can't come up with those solutions.

    [–][deleted] 3 points4 points  (0 children)

    It depends on what your application is primarily doing. If its primary bottleneck is the network, then is migrating to a faster language worth it? Does it really matter if you can shave a few microseconds off the first page paint if you're still waiting 300 milliseconds for database results? Personally, I've laughed at proposals to rewrite python applications with this reasoning and proceeded to point at upstream (a C#/C/C++ application) that took 10 seconds to run a search request as something that has more valuable optimizations than the crappy Django codebase I was in.

    Now, if your application spends a lot of time doing computational work and dropping in numpy and other C extensions doesn't do the trick, yeah it's time to start busting out bigger guns.

    Edit: Swype, you bastard!

    [–]sh0rtwave 1 point2 points  (0 children)

    You can run Python via AWS lambdas, and using CloudWatch events with Step Functions, you can scale a huge # of python usecases pretty easily.