We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如题,调用 dict.MakeConcurrent 创建 ConcurrentDict 时,会先用该函数计算shardCount,但是这个函数的算法没明白时啥意思,作者能辛苦解惑一下吗?谢谢
The text was updated successfully, but these errors were encountered:
@poettian Hi, 该算法的含义是求比param大的最近2次幂,比如:
1、当param为24的时候,比24大的最近2次幂是2^5 = 32 2、当param为33的时候,比33大的最近2次幂是2^6 = 64
可以自己代入上述两个值计算每一步,就知道为什么要这么写了。
Sorry, something went wrong.
明白了,多谢
No branches or pull requests
如题,调用 dict.MakeConcurrent 创建 ConcurrentDict 时,会先用该函数计算shardCount,但是这个函数的算法没明白时啥意思,作者能辛苦解惑一下吗?谢谢
The text was updated successfully, but these errors were encountered: