mirror of
https://github.com/dndx/phantun.git
synced 2025-09-20 06:04:31 +08:00
perf(fake-tcp) faster checksum calculation
Before: ``` test packet::benchmarks::bench_build_tcp_packet_128 ... bench: 207 ns/iter (+/- 25) test packet::benchmarks::bench_build_tcp_packet_1460 ... bench: 670 ns/iter (+/- 14) test packet::benchmarks::bench_build_tcp_packet_512 ... bench: 334 ns/iter (+/- 21) ``` After: ``` test packet::benchmarks::bench_build_tcp_packet_128 ... bench: 206 ns/iter (+/- 9) test packet::benchmarks::bench_build_tcp_packet_1460 ... bench: 259 ns/iter (+/- 16) test packet::benchmarks::bench_build_tcp_packet_512 ... bench: 212 ns/iter (+/- 11) ```
This commit is contained in:
@@ -10,6 +10,10 @@ description = """
|
||||
A TUN interface based, user space, asynchronous and high performance TCP stack that allows
|
||||
packet oriented tunneling with minimum overhead.
|
||||
"""
|
||||
|
||||
[features]
|
||||
benchmark = []
|
||||
|
||||
[dependencies]
|
||||
bytes = "1"
|
||||
pnet = "0.28.0"
|
||||
@@ -17,3 +21,4 @@ tokio-tun = "0.3.15"
|
||||
tokio = { version = "1.11.0", features = ["full"] }
|
||||
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||
log = "0.4"
|
||||
internet-checksum = "0.2.0"
|
||||
|
Reference in New Issue
Block a user