<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Web性能 :: 标签 :: yafeng 的博客</title><link>http://yafengabc.github.io/tags/web%E6%80%A7%E8%83%BD/index.html</link><description/><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sat, 19 Sep 2026 14:36:30 +0800</lastBuildDate><atom:link href="http://yafengabc.github.io/tags/web%E6%80%A7%E8%83%BD/index.xml" rel="self" type="application/rss+xml"/><item><title>web编程速度大比拼（nodejs go python）（非专业对比）</title><link>http://yafengabc.github.io/cnblogs/p5431695/index.html</link><pubDate>Mon, 25 Apr 2016 17:17:00 +0800</pubDate><guid>http://yafengabc.github.io/cnblogs/p5431695/index.html</guid><description>C10K问题的解决，涌现出一大批新框架，或者新语言，那么问题来了:到底谁最快呢？非专业程序猿来个非专业对比。&#10;比较程序：输出Hello World！&#10;测试程序：siege –c 100 –r 100 –b&#10;例子包括：&#10;1.go用http模块实现的helloworld&#10;2.go用martini微框架实现的Helloworld&#10;3.python3 python2 pypy分别用gevent server tornado实现的Hello world&#10;4.python3 python2 pypy分别用微框架bottle+gevent实现的Hello world&#10;5.NodeJS纯JS实现的Helloworld&#10;6.NodeJS用express框架实现的Helloworld&#10;测试平台：&#10;公司老旧的奔腾平台 Pentium(R) Dual-Core CPU E6700 @ 3.20GHz&#10;内存2GB（够弱了吧）&#10;先来宇宙最快的GO的测试：&#10;package main import ( "fmt" "net/http" ) func sayhelloName(w http.ResponseWriter, r *http.Request){ fmt.Fprintf(w, "hello world!") } func main() { http.HandleFunc("/", sayhelloName) http.ListenAndServe(":9090", nil) } 连续测试5次，成绩大体如下：&#10;Transactions: 10000 hits Availability: 100.00 % Elapsed time: 4.11 secs Data transferred: 0.11 MB Response time: 0.03 secs Transaction rate: 2433.09 trans/sec Throughput: 0.03 MB/sec Concurrency: 79.76 Successful transactions: 10000 Failed transactions: 0 Longest transaction: 0.20 Shortest transaction: 0.00 4.11秒，不错的成绩</description></item></channel></rss>