217d7bdf44
Go 1.15 provides native (*ecdsa.PublicKey).Equal method, but we can't drop our own Equal because the types are different and there is still code using our Equal (forcing it to convert types is counterproductive), while changing (*PublicKey).Equal to use (*ecdsa.PublicKey).Equal internally with some kind of (*ecdsa.PublicKey)(p).Equal((*ecdsa.PublicKey)(key)) slows it down: name old time/op new time/op delta PublicEqual-8 14.9ns ± 1% 18.4ns ± 2% +23.55% (p=0.000 n=9+10) name old alloc/op new alloc/op delta PublicEqual-8 0.00B 0.00B ~ (all equal) name old allocs/op new allocs/op delta PublicEqual-8 0.00 0.00 ~ (all equal) So leave it as is, but add this micro-bench. Refs. #1319. |
||
---|---|---|
.. | ||
hash | ||
keys | ||
doc.go | ||
verifiable.go |