Faster routing for Flask & Quart
Flask and Quart both utilise Werkzeug's HTTP router to route request paths to the relevant function. With the upcoming 2.2 release of Werkzeug this router will be significantly faster, with up to a factor of 5 seen in testing. This speedup increases with the size of the routing table and so you are likely to see further increases in your production applications. However, simple routing tables, as seen in micro-benchmarks, are unaffected and are unlikely to show a speedup.
The speedup is achieved by changing the algorithm from the original that matches against a list of regexs. Initially a radix/prefix tree algorithm was tried, but it couldn't support all of Werkzeug's features. Instead a state machine algorithm has been developed to be the new routing algorithm for Werkzeug.
Source: Faster routing for Flask & Quart, an article by Philip Jones.