週末看到一篇文章,對golang python c#作了簡單的性能測試,基於文章示例,我驗證了下過程和結論,原文在以下地址: python
http://blog.163.com/back-k_c/blog/static/60657320114252541156/ golang
在文章示例基礎上,我增長了python 2.7 32位,python 2.7 64位,python 3.3 64位,golang 1.0 64位,golang 1.1 64位的對照環境,個人測試文本比文章中大一倍,達到400多MB,測試結果以下: c#
go 1.0 32位
5.1804529
done, 710087.72225301 line/second
Total 5.1804529 second
go 1.1 64位
2.6947962
done, 1.3650664937111016e+06 line/second
Total 2.6947962 second
c# 4.0
done, 1355525 line/second
2.71 second
python 2.7 32位
('done ', 412887.2298280264, 'line/second')
(8.909396402335284, ' second')
python 2.7 64位
('done ', 394456.5538688705, 'line/second')
(9.32568102600945, ' second')
python 3.3.2 64位
done 256847.69137970768 line/second
14.322013097489055 second
性能