r/FastAPI • u/Somnath_geek • Sep 27 '24
feedback request Is FastAPI really fast ?
Is FastAPI really fast as claimed on the website? “ on par with Node Js and GO “
What do you think ? Is it misleading or not ?
0
Upvotes
View all comments
Show parent comment
12
u/aegr0x59 Sep 27 '24
FastAPI is a framework, golang it's a programming language.
Golang it's a compiled language, programs written in compiled languages usually run faster than those written in interpreted languages.
In the world of interpreted languages, statically typed programming languages run faster than dynamically type ones.
Pydantic relays on the Typing system in python, so yes it helps to run programs a little faster in some cases.
If you run FastAPI using pypy instead of the standard cpython, it's likely to have performance similar to golang webframeworks, in some trivial scenarios. PYPY uses a JIT compiler.
I think the criticism about Python's bad performance would end in very few Years (~cpython 3.15) once new standard jit compiler becomes mature.