sonic-cpp的SIMD加速不一定比架构设计、算法优化和微观调优的性能高,可以和LJSON性能对比
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- performance
Research direction
The issue names no sonic-cpp files, entry points, or tests. Start by reviewing the reported benchmark conditions and comparing them with LJSON's reuse and streaming modes. Done should be a reproducible, agreed comparison that clarifies whether sonic-cpp needs a specific performance change.
Written by the indexing model from the issue text.
Description
sonic-cpp解析和序列化干不赢yyjson,大概率也干不赢 LJSON 的复用模式(模式3)
- LJSON使用复用模式生成可编辑DOM,速度可比yyjson快约100%,内存占用只有yyjson的约50%
- LJSON的文件流模式支持真流式解析和序列化(边读文件边解析,边序列化边写文件)
- LJSON使用C99,没有使用手动SIMD等依赖具体CPU架构的优化,Linux-GCC/CLANG 和 Windows-MSVC编译都能支持(最初还运行在平头哥的CSKY-ECOS上)
以下是 Intel i7-1260P& OS: Ubuntu 20.04 (VMWare) 测试结果(第一个测试1000x表示放大1000倍(测试1次), 第2个测试的参数1000表示重复测试1000次),LJSON复用模式解析达到了2.5GB/s的解析速度。
LJSON使用自研数值和字符串转换引擎
- 浮点 ↔ 字符串转换性能远超标准库算法和小超主流算法(sprintf、grisu2、dragonbox)
- float64精度设定为16位十进制数字,边界处理追求最短表示而非机械的偶数舍入
- Dominant language
- C++
- Stars
- 977
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/sonic-cpp
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
请问下,下个release版本有规划了吗Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
对 parseImpl 进行优化Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
sonic 能在 mac 上测试吗Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
U64toa 单元测试用例不通过Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in bytedance/sonic-cpp
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
EchoTools/nevr-runtime#116 ·
Maintainers usually reply within 1 day
-
code-quality libc++
Difficulty 1/5 Under an hour Newbie friendliness 82/100
llvm/llvm-project#229284 ·
Maintainers usually reply within 1 day
-
test-issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
llvm/offload-test-suite#1557 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
iOS: hidden scale bar invalidates its intrinsic content size on every layout pass of MLNMapViewOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
maplibre/maplibre-native#4723 ·
Maintainers usually reply within 1 day