准备拿一个简单的go 项目练手
🕑 by pyList at 2015-06-16 13:15
以Golang 为核心,建立一个小项目,选一下可能要用到的东西
语言
golang
数据库
ssdb 一般各种语言都不是性能的瓶颈,数据库才是。都用go 了,当然选NoSQL。
json 解析
go 标准库 或 go-ujson 目前没有更快的,go 对json map 转换速度和python对 json dict 转换速度没可比性 这个结果让我选则NoSQL 很纠结,如果用NoSQL 将会有大量的json 数据转换,而又不想用庞大的MongoDB,其性能也一般。
go 1.4.2
标准库 loads 121.017531ms
go-ujson loads 63.217203ms
simplejson loads 90.202043ms
标准库 dumps 88.908435ms
python 2.7.3
simplejson
Loads Taken 14.655828476ms
Dumps Taken 28.5069942474ms
ujson
Loads Taken 12.7279758453
Dumps Taken 13.9889717102
json
Loads Taken 36.0250473022
Dumps Taken 23.5030651093
markdown
https://github.com/knieriem/markdown 27
明显优于python
python
misaka 488.649129868 ms
markdown2 68.4613540173 s
markdown 40.3043971062 s
go
knieriem/markdown 35.854568 ms
blackfriday.MarkdownBasic 1.098207145 s
blackfriday.MarkdownCommon 1.607117325 s
opennota/markdown 3.277178642s
ssdb go SDK
github.com/eryx/lessgo/data/hissdb 比 https://github.com/ego008/ssdb.py 3 慢一点点
每秒get or set 次数
go / python
get 13888 / 18181
set 10638 / 11904
这个不接近现实环境,差异主要来自报文解析效率。
本文网址: https://pylist.com/t/1434431724 (转载注明出处)
如果你有任何建议或疑问可以在下面 留言
发表第一条评论!
相关推荐
小工具
标签
coroutine
tornado
yield
例子
一个
celery
task
替换
方案
ssdb
python
缓存
分享
comet
构建
应用
lru
golang
高效
简单
一次方程
一元
代码
socks5
代理
依赖
安装
使用
bbr
openwrt
路由
开启
utf
gbk
big5
转换
google
身份验证
authenticator
迁移
手机
linux
ulimit
永久
设置
系统
app
mac
store
登录
未知
国外
vps
nginx
反向
访问
国内
上传
服务器
中断
文件
usb
上网卡
共享
网络
form
data
post
硬件加速
ubnt
er
固件
go2o
开源
完整
商业
spotify
chartify
图表
乱码
vim
中文
解决
正则
字符串
切割
自动更新
microsoft
关闭
静音
风扇
主机
笔记本
改造
低功耗
web
爬虫
组装
微信
尝鲜
视频
体验
cpu
debian
ubuntu
查看
温度
chrome
server
浏览
webdriver
微博
selenium
gnu
系统启动
编译
宅家
坑记
屏幕
动手
quic
抢先
useragent
搜索引擎
蜘蛛
真假
识别
最近发表
- Mac 关闭 Microsoft 自动更新
- Mac 登录 App Store 出现“发生了未知错误”的解决方法
- 老笔记本改造为无风扇静音主机方案
- 自己组装21瓦低功耗家庭爬虫、文件、web服务器
- 微信视频号尝鲜体验
- Ubuntu/Debian 查看CPU温度的方法
- 在Ubuntu/debian Server 系统使用Chrome 无头浏览模式
- 换手机后 Google 身份验证器 Google Authenticator 数据迁移的简单方法
- 使用Golang selenium WebDriver 自动登录微博
- 在 Ubuntu 或其它 GNU/Linux 系统下安装 Debian
- Mac 下制作 USB ubuntu/debian 系统启动、安装盘的几种方法
- ubuntu/debian 下自行编译 OpenWRT 固件
- 宅家自己动手换手机屏幕掉坑记
- 路由 UBNT ER-X 官方固件升级及开启硬件加速的方法
- 在 Nginx 和 Golang web 上抢先体验 QUIC
- 从UserAgent识别搜索引擎并判断真假蜘蛛
最近浏览
- go get 使用socks5 代理安装依赖库
- Openwrt 路由上开启BBR
- Golang 实现 GBK、Big5、UTF-8 之间的转换
- 换手机后 Google 身份验证器 Google Authenticator 数据迁移的简单方法
- Linux 系统永久设置ulimit
- Mac 登录 App Store 出现“发生了未知错误”的解决方法
- 在国外vps 上配置nginx 作反向代理访问国外网站
- OpenWrt 国内源
- Nginx 服务器上传大文件经常中断的解决方法
- Openwrt 使用USB 4G 上网卡共享网络
- python form-data post上传数据简便方法
- 路由 UBNT ER-X 官方固件升级及开启硬件加速的方法
- go2o: 一个完整的golang 商业开源项目
- Spotify开源的Python图表生成库chartify
- linux vim 中文显示乱码的解决方法
- Golang 正则切割字符串