Skip to content
winlin edited this page Feb 17, 2017 · 3 revisions

Benchmark

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.

I've done some benchmark. There is a detail benchmark asio_kcp for heavy network, which indicates the latency of KCP is 1/3 of libenet:

worst network lag happen:
asio: 10:51.21
291  295   269   268   231   195   249   230   225   204

enet: 10:51.21
1563   1520    1470    1482    1438    1454    1412    1637    1588    1540

The detail data is here benchmark. 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.
  • The lag is less than 1 second when network lag happen. 3 times better than enet when lag happen.
  • 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.
  • Good thing is the function detail which is writen in code is english. And you can use asio_kcp which is a good wrap.
  • 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.

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.

Clone this wiki locally