mirror of
https://github.com/golang/go
synced 2024-11-15 11:40:35 -07:00
fd985d23dc
Implement the encoding.(Binary|Text)Appender interfaces for "x509.OID".
Implement the encoding.BinaryAppender interface for "rand/v2.PCG" and "rand/v2.ChaCha8".
"rand/v2.ChaCha8.MarshalBinary" alse gains some performance benefits:
│ old │ new │
│ sec/op │ sec/op vs base │
ChaCha8MarshalBinary-8 33.730n ± 2% 9.786n ± 1% -70.99% (p=0.000 n=10)
ChaCha8MarshalBinaryRead-8 99.86n ± 1% 17.79n ± 0% -82.18% (p=0.000 n=10)
geomean 58.04n 13.19n -77.27%
│ old │ new │
│ B/op │ B/op vs base │
ChaCha8MarshalBinary-8 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
ChaCha8MarshalBinaryRead-8 83.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
│ old │ new │
│ allocs/op │ allocs/op vs base │
ChaCha8MarshalBinary-8 1.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
ChaCha8MarshalBinaryRead-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
For #62384
Change-Id: I604bde6dad90a916012909c7260f4bb06dcf5c0a
GitHub-Last-Rev:
|
||
---|---|---|
.. | ||
big | ||
rand |