Comments (4)
pbc lua decode 出来的 table 是惰性展开的。不支持迭代。
cjson.encode(t) 是错误的用法。
发自我的 iPad
在 2014年12月23日,上午10:08,XavierXia [email protected] 写道:
cjson.encode(t))
from pbc.
明白了。谢谢,也在您的博客上看到了相关文章,我准备试试您的sproto。
from pbc.
----- parse/decode size(Bytes) time(second) times
protobuf (binary to table) 117 9.6896359920502 1M万次
cjson (json str to json) 437 14.513430833817
pbc-lua (decode) nil 7.8595468997955
----- seri/encode size(Bytes) time(second) times
protobuf (table to binary) 117 6.0948710441589 1M万次
cjson (json to json str) 437 23.61823201179
pbc-lua (encode) 117 9.381726026535
测试数据如下:
{"segments":[{"type":1,"ct":1415384160,"ttl":1415384160,"id":100001}],"total":[{"value":1,"id":100188}],"pbid":[{"value":3,"id":100188},{"value":3,"id":100189},{"value":3,"id":100190}],"daily":[{"daily_id":1125,"date_id":[{"value":1,"id":100188}]},{"daily_id":1126,"date_id":[{"value":1,"id":100188}]}],"imp":[{"win":2,"bid":3,"time":8160,"id":100188},{"win":2,"bid":3,"time":8160,"id":100189},{"win":2,"bid":3,"time":8160,"id":100190}]}
我顺便做了一下测试,pbc-lua,protobuf 的lua部分均用luajit编译,您这个库的性能表现的很好。。
from pbc.
@XavierXia 请问你这个问题最终怎么解决的?我用的rapidjson,也遇到你这种问题
from pbc.
Related Issues (20)
- pbc_wmessage_integer
- mac os 上make命令不能执行 HOT 1
- 在 Mac 直接编译项目提供的 Demo,直接提示下面错误,大神能给看一下吗
- pbc_array_push_slice() bug?
- ubuntu+skynet+pbc环境,encode一个包含了int32类型的数据,会报错。但是改成了类型就不会了.
- skyent 加了一个protobuf 第一次运行报错了。 风哥看看这是啥原因啊 HOT 5
- protobuf 编译如何链接lua5.4,风哥是否能说的稍微详细一些。 HOT 3
- 最新版skynet里调用报错 HOT 3
- pbc是否支持protobuf3的any类型
- PBC library generate a BN256 curve
- enum 类型在 lua 层会被解析为 字符串呢?
- 是否支持grpc呢
- Error : rmessage decode context error HOT 2
- 是否能支持protobuf 3
- 编译binding/lua53时报错 HOT 3
- 在lua中修改的uint64字段字段,经过一次encode之后,又变回了原来的值,感觉没有修改成功,请云风大大看看怎么回事哈 HOT 1
- mingw环境下编译pbc的lua绑定库protobuf会出怪异现象,引用的skynet里lua5.4版本: HOT 5
- SEGV issue detected in pbc_wmessage_integer src/wmessage.c:137
- PBC有非Lazy的解析接口吗
- SEGV issue detected in pbc_wmessage_string src/wmessage.c:281:8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pbc.