Commit graph

4 commits

Author SHA1 Message Date
cui
31f9c9ff75
common/bitutil: deprecate XORBytes in favor of stdlib crypto/subtle (#33331)
XORBytes was added to package crypto/subtle in Go 1.20, and it's faster 
than our bitutil.XORBytes. There is only one use of this function
across go-ethereum so we can simply deprecate the custom implementation.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-12-08 17:40:59 +01:00
Justin Dhillon
b80643b737
accounts/usbwallet, common/bitutil: fix broken links in docs (#29078)
fixes some links in documentation
2024-03-13 07:54:40 +01:00
David Chase
31a1f164d9 common/bitutil: use result of TestBytes to prevent dead code elimination (#19846)
Gollvm has very aggressive dead code elimination that completely
removes one of these two benchmarks.  To prevent this, use the
result of the benchmark (a boolean), and to be "fair", make the
transformation to both benchmarks.

To be reliably assured of not removing the code, "use" means
assigning to an exported global.  Non-exported globals and
//go:noinline functions are possibly subject to this optimization.
2019-07-17 10:23:43 +02:00
Péter Szilágyi
36a800a1d2
common/bitutil, consensus/ethash: reusable bitutil package 2017-05-05 16:00:11 +03:00