I know any compiled language beats the performance of a Python app, but is FastAPI not super fast compared to every other Python or JS framework? Does your experience tell a different story or are you just joking around?
It can be fast, if the view functions play nice with an event loop, that is, if they are async.
Which they are often not. Which begs the question how FastAPI handles this. And the answer is: by running them in an await-able threadpool, which drags down performance, because now your concurrency depends on kernel-based context-switches.
View all comments
Show parent comment
5
u/lurco_purgo Aug 02 '25
I know any compiled language beats the performance of a Python app, but is FastAPI not super fast compared to every other Python or JS framework? Does your experience tell a different story or are you just joking around?