comparison src/org/tmatesoft/hg/util/SparseSet.java @ 265:3dd953c65619

Generous defaults for SparseSet not to fail on big manifests
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 19 Aug 2011 04:02:48 +0200
parents 6bb5e7ed051a
children
comparison
equal deleted inserted replaced
264:6bb5e7ed051a 265:3dd953c65619
51 51
52 @SuppressWarnings("unused") 52 @SuppressWarnings("unused")
53 private static final int MASK_8BIT = 0xFF, MASK_7BIT = 0x7F, MASK_6BIT = 0x3F, MASK_5BIT = 0x1F, MASK_4BIT = 0x0F; 53 private static final int MASK_8BIT = 0xFF, MASK_7BIT = 0x7F, MASK_6BIT = 0x3F, MASK_5BIT = 0x1F, MASK_4BIT = 0x0F;
54 private static final int I1_SHIFT = 15, I2_SHIFT = 6, I3_SHIFT = 0; 54 private static final int I1_SHIFT = 15, I2_SHIFT = 6, I3_SHIFT = 0;
55 // 6, 5, 5 55 // 6, 5, 5
56 private static final int I1_MASK = MASK_5BIT, I2_MASK = MASK_4BIT, I3_MASK = MASK_4BIT; 56 private static final int I1_MASK = MASK_7BIT, I2_MASK = MASK_4BIT, I3_MASK = MASK_4BIT;
57 57
58 private final int[] fixups = new int[] {0x1, 0x10, 0xA, 0xD, 0x1F }; // rehash attempts 58 private final int[] fixups = new int[] {0x1, 0x10, 0xA, 0xD, 0x1F }; // rehash attempts
59 private final IndexBranch[] level2 = new IndexBranch[I1_MASK + 1]; 59 private final IndexBranch[] level2 = new IndexBranch[I1_MASK + 1];
60 private int size = 0; 60 private int size = 0;
61 61