erigon-pulse/p2p
Victor Shyba 158fb2b606
Optimize memory buffer, simplify set32, use sha256-simd (#7060)
Hi,

I'm syncing Gnosis on a Celeron N5100 to get familiar with the codebase.
In the process I managed to optimize some things from profiling.
Since I'm not yet on the project Discord, I decided to open this PR as a
suggestion. This pass all tests here and gave me a nice boost for that
platform, although I didn't have time to benchmark it yet.

* reuse VM Memory objects with sync.Pool. It starts with 4k as `evmone`
[code
suggested](0897edb001/lib/evmone/execution_state.hpp (L49))
as a good value.
* set32 simplification: mostly cosmetic
* sha256-simd: Celeron has SHA instructions. We should probably do the
same for torrent later, but this already helped as it is very CPU bound
on such a low end processor. Maybe that helps ARM as well.
2023-03-14 07:17:04 +00:00
..
discover Optimize memory buffer, simplify set32, use sha256-simd (#7060) 2023-03-14 07:17:04 +00:00
dnsdisc dnsdisc: backport geth latest version and fixes for go1.20 (#6925) 2023-02-22 08:29:34 +00:00
enode CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
enr go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
nat Replace strings.Replace with strings.ReplaceAll (#5128) 2022-08-21 21:21:09 +07:00
netutil Use go:build lines and remove obsolete +build lines (#4175) 2022-05-17 14:46:53 +07:00
rlpx Enable gocritic linter (#5173) 2022-08-25 09:08:56 +07:00
simulations go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
dial_integration_test.go Use go:build lines and remove obsolete +build lines (#4175) 2022-05-17 14:46:53 +07:00
dial_test.go move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
dial.go Enable gosec linter (#5083) 2022-08-17 12:18:19 +07:00
message_test.go
message.go go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
metrics.go MIT licensed metrics lib (#2462) 2021-07-29 17:27:46 +07:00
node_key_config.go go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
peer_error.go p2p: define DiscReason as uint8 (#4090) 2022-05-06 16:19:53 +01:00
peer_test.go read metrics config from yaml file (#7089) 2023-03-14 00:07:05 +00:00
peer.go read metrics config from yaml file (#7089) 2023-03-14 00:07:05 +00:00
protocol.go Switch peerId from 256 to 512 bit (as in stable) (#3862) 2022-04-10 08:01:25 +01:00
server_test.go Optimize memory buffer, simplify set32, use sha256-simd (#7060) 2023-03-14 07:17:04 +00:00
server.go read metrics config from yaml file (#7089) 2023-03-14 00:07:05 +00:00
transport_test.go Refactor crypto.FromECDSAPub to MarshalPubkey/Std (#3797) 2022-03-31 11:06:20 +07:00
transport.go remove metrics package, step 1 (#4094) 2022-05-07 14:52:04 +07:00
util_test.go rename (#1978) 2021-05-20 19:25:53 +01:00
util.go Avoiding leaking the popped item (#6193) 2022-12-04 11:17:02 +07:00