TGViewer
Python notes Python notes @python_development_notes · 514 subscribers
Post #134 3.76K
This recounting by Max Bernstein details a real-world performance optimization saga from developing a custom Python runtime, where a seemingly innocuous string function bottlenecked Django performance. The analysis reveals how a naive Python implementation of str.rpartition led to excessive, costly UTF-8 indexing operations, emphasizing the need to look beyond surface-level profiler results to find the true cause of slowdowns.
https://bernsteinbear.com/blog/silly-perf/
Max Bernstein Optimizing Django by not being silly I just saw this post and it reminded me of a time when we had a similar situation, but with string operations in our VM. The project is now defunct but the code is open. Let’s go back in time.
More from @python_development_notes
  1. Sep 24, 2025https://www.youtube.com/watch?v=g-Cytq7YDCc
  2. Sep 23, 2025A recent report from The New Stack covers the major announcement that Nvidia is adding nat…
  3. Sep 22, 2025https://www.youtube.com/watch?v=A4Pn2lEdoLQ
  4. Sep 21, 2025🚀 The fast, Pythonic way to build MCP servers and clients https://github.com/jlowin/fastm…
  5. Sep 20, 2025This commentary from Jyn.dev embraces the idea of writing imperfect but effective Python c…
  6. Sep 19, 2025https://www.youtube.com/watch?v=5avSMc79V-w
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →