DEV Community

Discussion on: REST API Performance Comparison Python vs Golang

Collapse
 
timotheejeannin profile image
Timothée Jeannin

Thank you for taking the time to make this benchmark.

I think it would be more appropriate to use a tool like wrk to make a lot of concurrent requests and make sure all CPU cores are processing requests at 100% capacity.

In your tests, both the python code and the golang code are most of the time waiting for the database to respond. The CPU usage might be very low. Maybe the python code makes a small spike at 25% CPU on one core and the golang code make a small spike at 20% CPU on one code.

The time it takes to process one request is not a good indicator of how many requests per second can be made.