Skip to content

Instantly share code, notes, and snippets.

View hxzqlh's full-sized avatar

Allen hxzqlh

View GitHub Profile
@xigang
xigang / options.go
Last active November 17, 2020 07:00
Functional options for friendly APIs
//http://lubia.cn/2016/05/22/functional-options-for-friendly-apis/
//http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
package main
import (
"fmt"
)
type Options struct {
Name string

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)