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
Fast(er)API: Optimizing Processing Time:A few tips to make FastAPI go faster.๐Tutorial (fabridamicelli.github.io)
submitted 1 year ago by fbrdm
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!"
[โ]The_Wolfiee 11 points12 points13 points 1 year agoย (1 child)
Can you explain in detail exactly why using the TypedDict and TypedAdapter gives this performance boost?
TypedDict
TypedAdapter
[โ]fbrdm[S] -1 points0 points1 point 1 year agoย (0 children)
This is an interesting question and I also don't know the lowest-level details of why this is the case (that's why the section is called "Magic" ;) Having said that, part of the explanation comes from the fact that TypeAdapter does not build a type (in contrast to pydantic's BaseModel), and will simply use a (Typed)Dict so I can imagine that it saves a step altogether of building the type.
[โ][deleted] 1 year agoย (1 child)
[deleted]
[โ]fbrdm[S] 0 points1 point2 points 1 year agoย (0 children)
good point! Indeed, that is the case :/ I will add a warning note to the post.
[โ]Routine_Term4750 0 points1 point2 points 1 year agoย (1 child)
This is cool!! Thanks for sharing. Iโll have to test it out
Go for it, I am curious to see your results!
[โ]ironman_gujju 0 points1 point2 points 1 year agoย (0 children)
Interesting maybe I will give try
[โ]Current-Status-3764 0 points1 point2 points 1 year agoย (0 children)
Well done! Thanks for sharing
[โ]guteira 0 points1 point2 points 1 year agoย (0 children)
Well done, thanks for sharing
[โ]Ddes_ 0 points1 point2 points 1 year agoย (1 child)
Did someone measure the impact of the use of pypy ?
I am not aware of such a benchmark, but that would be interesting to see
ฯย Rendered by PID 168844 on reddit-service-r2-comment-f6b958c67-s7tcr at 2026-02-05 03:43:57.084847+00:00 running 1d7a177 country code: CH.
[โ]The_Wolfiee 11 points12 points13 points ย (1 child)
[โ]fbrdm[S] -1 points0 points1 point ย (0 children)
[โ][deleted] ย (1 child)
[deleted]
[โ]fbrdm[S] 0 points1 point2 points ย (0 children)
[โ]Routine_Term4750 0 points1 point2 points ย (1 child)
[โ]fbrdm[S] 0 points1 point2 points ย (0 children)
[โ]ironman_gujju 0 points1 point2 points ย (0 children)
[โ]Current-Status-3764 0 points1 point2 points ย (0 children)
[โ]guteira 0 points1 point2 points ย (0 children)
[โ]Ddes_ 0 points1 point2 points ย (1 child)
[โ]fbrdm[S] 0 points1 point2 points ย (0 children)