Skip to content

Commit

Permalink
Remove redundant multiplication as both sides of the comparison are m…
Browse files Browse the repository at this point in the history
…ultiplied by the same number.
  • Loading branch information
ijuma committed Dec 23, 2011
1 parent cc661b2 commit 23dee70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/kamikaze/docidset/utils/DocSetFactory.java
Expand Up @@ -75,7 +75,7 @@ public static DocSet getDocSetInstance(int min, int max, int count, FOCUS hint)
{
// Always Favor IntArray or OpenBitSet
case PERFORMANCE:
if((((max-min)>>>LONG_SHIFT)+1)*2*INT_SIZE > count * INT_SIZE)
if((((max-min)>>>LONG_SHIFT)+1)*2 > count)
return new IntArrayDocIdSet(count);
else
//return new IntArrayDocIdSet(count);
Expand All @@ -100,7 +100,7 @@ public static DocSet getDocSetInstance(int min, int max, int count, FOCUS hint)
return new PForDeltaDocIdSet();
//return new P4DDocIdSet();
}
else if((((max-min)>>>LONG_SHIFT)+1)*2*INT_SIZE > count * INT_SIZE)
else if((((max-min)>>>LONG_SHIFT)+1)*2 > count)
return new IntArrayDocIdSet(count);
else
return new OBSDocIdSet(max-min+1);
Expand Down

0 comments on commit 23dee70

Please sign in to comment.