new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

FastAPI · all subjects

async/performance

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Path operations with normal def run in thread pool

When a path operation function is declared with normal `def` instead of `async def`, it runs in an external threadpool that is then awaited, preventing the server from blocking. This allows synchronous code to coexist with asynchronous operations.

FastAPI performance with async and parallelism

FastAPI provides concurrency benefits similar to NodeJS and can combine both concurrency and parallelism (multiprocessing) for CPU-bound workloads. This combination, especially with Python's popularity in data science and machine learning, makes FastAPI suitable for diverse workloads with performance comparable to compiled languages like Go.

FastAPI performance benchmarks

According to independent TechEmpower benchmarks, FastAPI applications running under Uvicorn are among the fastest Python frameworks available, only below Starlette and Uvicorn themselves (which FastAPI uses internally).

Give your agent this brain