-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I have made two simple test (below). The first, with SparseBitSet gives me OOM. The second works without much memory usage. What I made wrong?
public static void main(String[] args) {
SparseBitSet[] sbs = new SparseBitSet[1000000];
for(int i=0; i<1000000; i++) {
sbs[i]=new SparseBitSet();
for(int j=0; j<100; j++) {
sbs[i].set((int)(Math.random()*1000000));
}
}
System.out.println();
}
and
IntArrayList[] sbs = new IntArrayList[1000000];
for(int i=0; i<1000000; i++) {
sbs[i]=new IntArrayList();
for(int j=0; j<100; j++) {
sbs[i].add((int)(Math.random()*1000000));
}
}
System.out.println();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels