erigon-pulse/p2p/discover/v5wire
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
..
testdata
crypto_test.go Optimize memory buffer, simplify set32, use sha256-simd (#7060) 2023-03-14 07:17:04 +00:00
crypto.go
encoding_test.go CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
encoding.go Optimize memory buffer, simplify set32, use sha256-simd (#7060) 2023-03-14 07:17:04 +00:00
msg.go
session.go