Skip to content

Instantly share code, notes, and snippets.

@thehowl
thehowl / peppymessages.txt
Last active September 28, 2023 04:35
wank wank wank wank
+---------+----------+----------+---------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | username | channel | moment | is_action | message |
+---------+----------+----------+---------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 36582 | peppy | #osu | 2015-07-15 09:33:16 | 0 | !system restart tatoe |
| 37137 | peppy | #osu | 2015-07-15 09:38:09 |

Performance of Flask, Tornado, GEvent, and their combinations

Wensheng Wang, 10/1/11

Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html

When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:

1, Pure Flask (pure_flask.py)

@Cairnarvon
Cairnarvon / crypt.py
Created March 3, 2013 11:20
Pure-Python implementation of crypt(3).
#!/usr/bin/env python
# Initial permutation
IP = (
58, 50, 42, 34, 26, 18, 10, 2,
60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6,
64, 56, 48, 40, 32, 24, 16, 8,
57, 49, 41, 33, 25, 17, 9, 1,
59, 51, 43, 35, 27, 19, 11, 3,