Go vs Python more request per second

Avelino
2 min readJan 17, 2015

--

I use python because it is a simple and powerful language, but never used by be excellence in performance (But for python web serves very well)! I know that benchmark based on “Hello World” does not want to say too much, but it’s interessanta we know what technology (framework) is more time to answer performance web support request.

There is a python framework named Falcon(Falcon follows the REST architectural style, meaning (among other things) that you think in terms of resources and state transitions, which map to HTTP verbs) which is extremely performance, even using asynchronous backup processing library (as gevent, is a coroutine-based Python networking library that uses greenlet to provide a high-level asynchronous API on top of the libev event loop).

These days I commented on the social network about the performance of the falcon and some people commented that it would be interesting to do a benchmark with Go, and here I am writing a blogpost for the performance of a webserver written in Go and Python to see which responds more request per second!

Let’s go…

Falcon application

Go application

Benchmark

Used:

Falcon

Requests per second: 4888.35 in 2.046 seconds

Go

Requests per second: 15711.36 in 0.636 seconds

We can let Go more performer (compiling software), follows the result after compiling:

Requests per second: 20978.30 in 0.415 seconds

Conclusion

Yes Go is much more performance than Python in web requests, nor why I stop programming in Python. Today we have a very large ecosystem in the world of Python where does Python be very powerful (and good), an example is mathematical libraries such as numpy, pandas and etc.

This blogpost show that Python (or what you want other technology) is not the silver bullet (solution to all the problems). Choose the right technology for your problem, not everything is nail, to use hammer!

Originally published at /2015/01/go-vs-python-more-request-per-second on January 17, 2015.

--

--

Written by Avelino

Open Source ⭐ GitHub Star / CTO at Buser

Responses (2)