• 1 Post
  • 17 Comments
Joined 1 年前
cake
Cake day: 2023年6月22日

help-circle



  • Python has gotten faster, but it’s still nowhere near what you expect from traditional compiled languages. It can’t be.
    The trick to writing performant Python code is to get good (native) libraries and let it handle the heavy lifting.

    For performance sensitive stuff, the fact that pure Python is very slow really matters. For stuff that’s not performance sensitive (that is, 99% of the code out there) it doesn’t really matter, but even then it’s better to be fast than to be slow.

    Now this is not something I would ordinarily have a problem with. I use Python for a reason and it’s not performance. But if I end up writing Python like it’s rust, I might as well do rust and reap the (massive!!!) performance and memory profile benefits too while I’m at it.