Faruk Akgul

Python Web Frameworks Benchmark

July 01, 2013 | View Comments

Falcon is a Python web framework developed by Rackspace. It also has a benchmarking tool to test the framework against other frameworks.

Out of curiosity, I wanted to see how other frameworks perform in this benchmark.

Frameworks of this benchmark:

Iteration 10

In this test, benchmark is iterated 10 times. The result:

1. wheezy.web........39,681 req/sec or  25 μs/req (28x)
2. Falcon............23,981 req/sec or  42 μs/req (17x)
3. Bottle.............9,479 req/sec or 106 μs/req (7x)
4. webpy..............6,246 req/sec or 160 μs/req (4x)
5. Werkzeug...........5,949 req/sec or 168 μs/req (4x)
6. Pyramid............3,573 req/sec or 280 μs/req (3x)
7. Flask..............3,079 req/sec or 325 μs/req (2x)
8. Pecan..............2,640 req/sec or 379 μs/req (2x)
9. django.............1,770 req/sec or 565 μs/req (1x)
10. CherryPy..........1,410 req/sec or 709 μs/req (1x)

wheezy.web looks like the winner.

Iteration 100

In this test, benchmark is iterated 100 times. wheezy.web is the winner of this iteration as well.

1. wheezy.web........49,022 req/sec or  20 μs/req (35x)
2. Falcon............29,378 req/sec or  34 μs/req (21x)
3. Bottle............11,685 req/sec or  86 μs/req (8x)
4. webpy..............6,763 req/sec or 148 μs/req (5x)
5. Werkzeug...........6,533 req/sec or 153 μs/req (5x)
6. pyramid............3,932 req/sec or 254 μs/req (3x)
7. Flask..............3,334 req/sec or 300 μs/req (2x)
8. Pecan..............2,813 req/sec or 355 μs/req (2x)
9. django.............1,867 req/sec or 536 μs/req (1x)
10. CherryPy..........1,405 req/sec or 712 μs/req (1x)

Iteration 1,000

Benchmark is iterated 1,000 times. wheezy.web is the winner of this iteration.

1. wheezy.web........51,343 req/sec or  19 μs/req (37x)
2. Falcon............29,742 req/sec or  34 μs/req (21x)
3. Bottle............12,030 req/sec or  83 μs/req (9x)
4. webpy..............6,795 req/sec or 147 μs/req (5x)
5. Werkzeug...........6,759 req/sec or 148 μs/req (5x)
6. pyramid............4,061 req/sec or 246 μs/req (3x)
7. Flask..............3,231 req/sec or 310 μs/req (2x)
8. Pecan..............2,839 req/sec or 352 μs/req (2x)
9. django.............1,875 req/sec or 533 μs/req (1x)
10. CherryPy..........1,386 req/sec or 722 μs/req (1x)

Iteration 10,000

Benchmark is iterated 10,000 times. wheezy.web is the winner of this iteration.

1. wheezy.web........52,259 req/sec or  19 μs/req (45x)
2. Falcon............30,345 req/sec or  33 μs/req (26x)
3. Bottle............12,013 req/sec or  83 μs/req (10x)
4. webpy..............6,831 req/sec or 146 μs/req (6x)
5. Werkzeug...........6,723 req/sec or 149 μs/req (6x)
6. pyramid............4,061 req/sec or 246 μs/req (3x)
7. Flask..............3,263 req/sec or 306 μs/req (3x)
8. Pecan..............2,825 req/sec or 354 μs/req (2x)
9. django.............1,862 req/sec or 537 μs/req (2x)
10. CherryPy..........1,173 req/sec or 852 μs/req (1x)

Iteration 50,000

Benchmark is iterated 50,000 times. wheezy.web is the winner of this iteration.

1. wheezy.web........52,245 req/sec or  19 μs/req (48x)
2. Falcon............30,195 req/sec or  33 μs/req (28x)
3. Bottle............11,977 req/sec or  83 μs/req (11x)
4. webpy..............6,950 req/sec or 144 μs/req (6x)
5. Werkzeug...........6,837 req/sec or 146 μs/req (6x)
6. pyramid............4,035 req/sec or 248 μs/req (4x)
7. Flask..............3,300 req/sec or 303 μs/req (3x)
8. Pecan..............2,881 req/sec or 347 μs/req (3x)
9. django.............1,882 req/sec or 531 μs/req (2x)
10. CherryPy..........1,090 req/sec or 917 μs/req (1x)

I've run Falcon's benchmark including my favorite web frameworks (especially wheezy.web) just to see how they perform. In overall, I'm quite surprised of Flask's performance. I knew wheezy.web was going to perform very well so I wasn't really surprised. Andriy's own benchmark shows similar results.

Here's benchmark as a chart.

Share:Tweet · reddit

blog comments powered by Disqus