This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bigIntInc speeds up z.Add(z, one) operations when z > 0 | |
func bigIntInc(z *big.Int) { | |
zBits := z.Bits() | |
// big.NewInt( 9).Sign() == 1 | |
// For speed and simplicity this only tries to increment the least significant digits. | |
// Using a base 10 example: 1000+1 only affects the least significant digit. | |
// Only when the least significant digit is 9, 1009+1, then more significant digits are affected. | |
if z.Sign() > 0 && zBits[0] < math.MaxUint { | |
// overflow does not happen due to zBits[0] < math.MaxUint check | |
// uint(zBits[0])++ is not allowed by Go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user@host:~# sysctl -n net.ipv6.auto_flowlabels | |
1 | |
user@host:~# curl -6 https://code.jquery.com/jquery-3.6.0.min.js -o /dev/null | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104 | |
user@host:~# sysctl -w net.ipv6.auto_flowlabels=0 |