You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/07/26 14:33:37 UTC
[GitHub] [shardingsphere] terrymanu opened a new pull request #11515: Revise #11513
terrymanu opened a new pull request #11515:
URL: https://github.com/apache/shardingsphere/pull/11515
Fixes #11513.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on pull request #11515: Revise #11513
Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #11515:
URL: https://github.com/apache/shardingsphere/pull/11515#issuecomment-886778099
> @terrymanu hi, I looked at the source code of `HashMap` and tested that the `threshold` value calculated by `new HashMap<>(3)` and `new HashMap<>(3, 1)` is the same, and it will not expand when storing three elements, so I I chose `new HashMap<>(3)` this concise way.
The `DEFAULT_LOAD_FACTOR` is `0.75f`, set loadFactor to `1` to avoid re-calculate is better
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] yx9o commented on pull request #11515: Revise #11513
Posted by GitBox <gi...@apache.org>.
yx9o commented on pull request #11515:
URL: https://github.com/apache/shardingsphere/pull/11515#issuecomment-886788736
`DEFAULT_LOAD_FACTOR=0.75f` is no problem, but I actually tested `new HashMap<>(3);` and `new HashMap<>(3, 1);`, they will not expand when storing 3 elements, thank you, I will use the syntax of `new HashMap<>(3,1)` in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu merged pull request #11515: Revise #11513
Posted by GitBox <gi...@apache.org>.
strongduanmu merged pull request #11515:
URL: https://github.com/apache/shardingsphere/pull/11515
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] yx9o commented on pull request #11515: Revise #11513
Posted by GitBox <gi...@apache.org>.
yx9o commented on pull request #11515:
URL: https://github.com/apache/shardingsphere/pull/11515#issuecomment-886773894
@terrymanu hi, I looked at the source code of `HashMap` and tested that the `threshold` value calculated by `new HashMap<>(3)` and `new HashMap<>(3, 1)` is the same, and it will not expand when storing three elements, so I I chose `new HashMap<>(3)` this concise way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org