Last year at PyCon US 2022, @tonybaloney ran a basic benchmark of Flask. I finally got around to it, and achieved a ✨ 35% ✨ speedup to routing and environ processing.
Due to Python 2/3, Werkzeug had its own modified copy of `urlparse`/`urllib.parse`, with a lot of unnecessary encoding/decoding due to str/bytes support. I finally replaced that with the standard library, and got a huge speed boost.
replace calls to `werkzeug.urls` with `urllib.parse` by davidism · Pull Request #2608 · pallets/werkzeug
Use urllib.parse functions instead of our own implementation. Deprecate all of werkzeug.urls except for uri_to_iri and iri_to_uri. My benchmark shows a 35% speedup in routing and responses, 8% from...

