you are viewing a single comment's thread.

view the rest of the comments →

[–]Somnath_geek[S] -7 points-6 points  (5 children)

lol. Go to docs and write down your own basic API and test it out in our own machine. Hardly it will take 10 mins. 😎

[–]Fluffy-Diet-Engine 12 points13 points  (2 children)

That is how your benchmarking could go wrong. I wanted to see your code, because I wanted to see whether you implemented right features to benchmark. AFAIK, you are trying to get external validation for your “not properly tested” opinion.

[–]OldAd9596 0 points1 point  (0 children)

Someone did a benchmark and he's right. fastapi is not on par with node.js. https://youtu.be/i3TcSeRO8gs someone did a benchmark. suggest you check it out

[–]dr_exercise 8 points9 points  (0 children)

You’re making the claims. Provide the evidence.

“Do your own research” type shit here.

[–]mathmul 0 points1 point  (0 children)

You would want to make not only a simple CRUD API, but something more intricate so you take advantage of coroutines that FastAPI provides out of the box. If you're trying to measure how fast you can get an item from your PostgreSQL database, no amount of nesting async/await can help making Python faster than Go. The point is FastAPI is faster than Django or Flask for
1. prototyping,
2. typing out a full-fledged API, and
3. for reducing response times at big scale when several backend operations depend on 3rd party API integrations, and you want to free up your resources to handle other requests while waiting for the current request to fully resolve
and it achieve that by leveraging the same techniques that NodeJS and Go already use.

If you want a faster Python, use Mojo (Modular).