Files
tendermint/p2p
JayT106 080dfab992 p2p/pex: reuse hash.Hasher per addrbook for speed (#6509) (#9445)
Cherry-picking PR #6509

By pre-creating the hasher, instead of creating new one everytime addrbook.hash is called.

```
name             old time/op    new time/op    delta
AddrBook_hash-8     181ns ±13%      80ns ± 1%  -56.08%  (p=0.000 n=10+10)

name             old alloc/op   new alloc/op   delta
AddrBook_hash-8      216B ± 0%        8B ± 0%  -96.30%  (p=0.000 n=10+10)

name             old allocs/op  new allocs/op  delta
AddrBook_hash-8      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.000 n=10+10)
```

Fixed #6508



---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed
2022-09-21 08:34:14 +00:00
..
2022-08-30 12:28:46 -04:00
2022-08-30 12:28:46 -04:00
2019-04-03 11:22:52 +02:00
2022-08-30 12:28:46 -04:00
2022-08-10 14:35:14 -04:00
2020-09-07 15:03:18 +00:00
2020-09-04 11:58:03 +00:00
2022-07-26 22:53:15 +02:00
2022-08-10 14:35:14 -04:00
2022-08-30 12:28:46 -04:00
2020-09-07 15:03:18 +00:00

p2p

The p2p package provides an abstraction around peer-to-peer communication.

Docs:

  • Connection for details on how connections and multiplexing work
  • Peer for details on peer ID, handshakes, and peer exchange
  • Node for details about different types of nodes and how they should work
  • Config for details on some config option