mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
7194c847b6
This change significantly improves the performance of RLPx message reads and writes. In the previous implementation, reading and writing of message frames performed multiple reads and writes on the underlying network connection, and allocated a new []byte buffer for every read. In the new implementation, reads and writes re-use buffers, and perform much fewer system calls on the underlying connection. This doubles the theoretically achievable throughput on a single connection, as shown by the benchmark result: name old speed new speed delta Throughput-8 70.3MB/s ± 0% 155.4MB/s ± 0% +121.11% (p=0.000 n=9+8) The change also removes support for the legacy, pre-EIP-8 handshake encoding. As of May 2021, no actively maintained client sends this format. |
||
---|---|---|
.. | ||
decode_tail_test.go | ||
decode_test.go | ||
decode.go | ||
doc.go | ||
encode_test.go | ||
encode.go | ||
encoder_example_test.go | ||
iterator_test.go | ||
iterator.go | ||
raw_test.go | ||
raw.go | ||
safe.go | ||
typecache.go | ||
unsafe.go |