mirror of
https://github.com/skywind3000/kcp.git
synced 2024-12-27 15:40:13 +08:00
Updated EN_KCP Benchmark (markdown)
parent
3da380e793
commit
01c09c2914
@ -1,8 +1,8 @@
|
||||
# Benchmark
|
||||
|
||||
如果网络从来不丢包,那么你直接用 TCP就行了,甚至直接裸UDP都没关系,但是网络因为丢包造成卡顿,特别是高峰时期丢包会上到10%的情况,移动设备上这个情况更糟糕。
|
||||
TCP is good enough when network is not heavy. But the experience is worse when packet is dropped for heavy network, for instance 10% packets dropped.
|
||||
|
||||
我自己评测过很多,[asio_kcp](https://github.com/libinzhangyuan/asio_kcp) 的作者做过比较详细的评测,在网络变糟糕的情况下,KCP的延迟比 libenet低三倍以上:
|
||||
I've done some benchmark. There is a detail benchmark [asio_kcp](https://github.com/libinzhangyuan/asio_kcp) for heavy network, which indicates the latency of KCP is 1/3 of `libenet`:
|
||||
|
||||
```cpp
|
||||
worst network lag happen:
|
||||
@ -13,7 +13,7 @@ enet: 10:51.21
|
||||
1563 1520 1470 1482 1438 1454 1412 1637 1588 1540
|
||||
```
|
||||
|
||||
更详细的评测可以看这里:[benchmark](https://github.com/libinzhangyuan/reliable_udp_bench_mark/blob/master/bench_mark.md),感谢 asio_kcp 的作者 zhangyuan 详细对比了 UDT, libenet和 kcp,并给出结论如下:
|
||||
The detail data is here [benchmark](https://github.com/libinzhangyuan/reliable_udp_bench_mark/blob/master/bench_mark.md). Thanks the owner of `asio_kcp` `zhangyuan` to compare UDT, libenet and KCP:
|
||||
|
||||
* ASIO-KCP has good performace in wifi and phone network(3G, 4G).
|
||||
* The kcp is the first choice for realtime pvp game.
|
||||
@ -21,7 +21,7 @@ enet: 10:51.21
|
||||
* The enet is a good choice if your game allow 2 second lag.
|
||||
* UDT is a bad idea. It always sink into badly situation of more than serval seconds lag. And the recovery is not expected.
|
||||
|
||||
其他可以左右你选择的情况:
|
||||
And more:
|
||||
|
||||
* enet has the problem of lack of doc. And it has lots of functions that you may intrest.
|
||||
* kcp's doc is chinese.
|
||||
@ -29,5 +29,5 @@ enet: 10:51.21
|
||||
* The kcp is a simple thing. You will write more code if you want more feature.
|
||||
* UDT has a perfect doc. UDT may has more bug than others as I feeling.
|
||||
|
||||
我当年主要测试了 KCP和 TCP/UDT的比较,扫了一眼 libenet觉得协议实现中规中矩,缺乏很多现代传输协议的技术,所以并没有详细测试。而 asio-kcp的作者同时给出了KCP/enet/udt三者的详细比较,为犹豫选择的人提供了更多指引。
|
||||
I just compare the KCP with TCP/UDT, for I think `libenet` does not introduce modern transport techniques. The benchmark from owner of `asio-kcp` shows the difference of KCP/enet/UDT.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user