Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a1ad2ca

Browse files
add: comment for reference
1 parent d73b2bb commit a1ad2ca

File tree

1 file changed

+1
-0
lines changed
  • src/_DataStructures_/BloomFilters

1 file changed

+1
-0
lines changed

‎src/_DataStructures_/BloomFilters/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class BloomFilters {
3737
}
3838

3939
// eslint-disable-next-line no-bitwise
40+
// To get a better hash. It may look useless but here is the explanation: https://stackoverflow.com/questions/38356644/why-is-the-bitwise-and-of-two-of-the-same-value-producing-a-different-value
4041
hashVal &= hashVal;
4142

4243
return Math.abs(hashVal % this.size);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /