William Nauroy·Nov 5Inside protoruf: encoding a Pydantic model to protobuf in 1 µsGoogle’s protobuf encodes a message in 0.3 µs. Getting your Pydantic model into it costs 58 µs. Here is how protoruf skips that step
InAlt.byWilliam Nauroy·Nov 314× faster gRPC in Python, with the handlers still in PythonSame Python handlers, 17× less CPU. The last 40 % came from counting system calls, not from writing faster codeA response icon2A response icon2
William Nauroy·Nov 3gRPC in Python, the FastAPI way: models in, models outHere is what a gRPC handler usually looks like in Python: