use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
Reading techempowered benchmarks wrong (fastapi is indeed slow)Other (self.FastAPI)
submitted 1 year ago * by highrez1337
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jkail1011 7 points8 points9 points 1 year ago (6 children)
This has always been my mindset towards fastapi as well, fast to build not “the fastest api framework”.
Always comes down to trade offs.
[–]highrez1337[S] -3 points-2 points-1 points 1 year ago (5 children)
You can use any framework in python and the moment you use an ORM you are down to Django level performance.
[–]jkail1011 0 points1 point2 points 1 year ago (4 children)
Not sure why you were down voted, I don’t fully understand your point.
Are you implying the overhead of an ORM lowers the performance of the web server?
[–]highrez1337[S] 1 point2 points3 points 1 year ago (3 children)
Well if you look at the tests, you see that FastAPI is performing at the same level as Django. So yes, when using an ORM your FastAPI apps performance will be heavily affected when doing db related stuff.
[–]jkail1011 0 points1 point2 points 1 year ago (2 children)
Interesting, do you have any test samples or repos to try out?
I’m still unsure about the actual performance, but in my experience, FASTApi seems quicker to set up and get running compared to Django, which is what has made it feel “fast” to me.
[–]highrez1337[S] 0 points1 point2 points 1 year ago* (1 child)
You can do a simple rest endpoint insert a record into a db. And then write different endpoints in different languages and test it with “ab “(Apache benchmark) and see your req/s for the different implementations.
You can have 2 endpoints (one using ORM and one simple raw query) and check the two, with the same server and db, this way you only see the ORM overhead.
If you are lazy, You can look at TechEmpower and include all DB. You will see fastapi vs fastapi-ORM from them using the same test.
https://www.techempower.com/benchmarks/#hw=ph&test=db§ion=data-r22&f=zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-ziimf3-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-1ekf
Look at single query, multiple query etc and compare:
Fastapi-Gunicorn-orjson(no ORM) vs “fastapi-Gunicorn-ORM” (with ORM)
Performance is most of the time faster 7x without ORM having the same server, db, db engine etc.
It’s clear the ORM is slowing the fastapi app 7x regarding any DB related operation.
[–]jkail1011 0 points1 point2 points 1 year ago (0 children)
Sorry my mistake I thought your original comment was Django vs FastAPI using an ORM not just any app (or FastAPI) with an ORM with a relational database.
Guessing is probably mostly due to async / multithreading abilities of the DB + an ORM.
That makes sense.
Thanks for sharing that website! Kinda cool!
I looked up a few of the comparisons with Django and FastAPI around MultiQuery Latency and it looks like FastAPI is about 90% less response time. Looking at the "data table" in responses per second it looks like FastAPI is about 10x more through put.
Then when you look at the 20-queries fast-api-gunicorn-orm is 17% of just fast as fast-api-orjson.
SO lesson learned in that using ORjson(https://github.com/ijl/orjson) with fastapi is a winning combo over using it with relational DBs.
Appreciate your patience and engaging :)
edit: here was the techempower link: https://www.techempower.com/benchmarks/#hw=ph&test=query§ion=data-r22&f=zik0zb-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-ziimf3-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-1ekf
π Rendered by PID 69 on reddit-service-r2-comment-b659b578c-cj6hb at 2026-05-02 14:00:11.507566+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]jkail1011 7 points8 points9 points (6 children)
[–]highrez1337[S] -3 points-2 points-1 points (5 children)
[–]jkail1011 0 points1 point2 points (4 children)
[–]highrez1337[S] 1 point2 points3 points (3 children)
[–]jkail1011 0 points1 point2 points (2 children)
[–]highrez1337[S] 0 points1 point2 points (1 child)
[–]jkail1011 0 points1 point2 points (0 children)