|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTestCase
chemCast.test.BigFileTest
public class BigFileTest
Constructor Summary | |
---|---|
BigFileTest(java.lang.String arg0)
|
Method Summary | |
---|---|
void |
test()
|
void |
testArrays()
This tests how many Double[] arrays can fit in memory. |
void |
testArrays1()
This tests how many double[] arrays can fit in memory. |
void |
testBitsets()
This tests how many bitsets can fit in memory. |
void |
testHashtable()
This tests how many hashtables can fit in memory. |
void |
testIterator()
|
void |
testLookup()
|
void |
testMatrix()
new double[1000000][100] Out of memory new double[1000000][100] Out of memory new double[500000][10] OK new double[500000][20] Out of memory new double[500000][50] Out of memory new double[500000][100] Out of memory new double[250000][10] OK new double[250000][20] OK new double[250000][50] Out of memory new double[250000][100] Out of memory |
void |
testMolecules()
This tests how many IAtomContainer s can fit in memory. |
void |
testMoleculesArrayProperty()
One more test how many IAtomContainer s can fit in memory. |
void |
testProcessing()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BigFileTest(java.lang.String arg0)
Method Detail |
---|
public void testBitsets()
1494660 empty bitsets 660356 half empty bs.set(0,511); 401123 full bs.set(0,1023);
public void testArrays1()
80626 double[200] 32631 double[100] 156775 double[50] 363825 double[20] 660788 double[10]
public void testMatrix()
new double[1000000][100] Out of memory new double[1000000][100] Out of memory new double[500000][10] OK new double[500000][20] Out of memory new double[500000][50] Out of memory new double[500000][100] Out of memory new double[250000][10] OK new double[250000][20] OK new double[250000][50] Out of memory new double[250000][100] Out of memory
public void testArrays()
16434 Double[200] 32631 Double[100] 64638 Double[50] 156910 Double[20] 297868 Double[10]Conclusion: 3 to 7 times worse than double[] (as expected ...)
public void testHashtable()
658723 empty hashtables 69524 hashtables containing 10 pairseach; 93077 hashtables containing 10 pairs each; 10258 hashtables containing 100 pairs each; 7476 hashtables containing 100 pairs each; 3594 hashtables containing 200 pairs each; 5159 hashtables containing 200 pairs each;
public void testMolecules()
IAtomContainer
s can fit in memory.
So far (1GB RAM)
Molecules without properties 1485 molecules created by MoleculeFactory.makeAlkane(100) 2969 molecules created by MoleculeFactory.makeAlkane(50) 4973 small molecules created by MoleculeFactory.makeAlkane(30) 7433 small molecules created by MoleculeFactory.makeAlkane(20) 14885 small molecules created by MoleculeFactory.makeAlkane(10) Molecules with properties - 10 pairsConclusion: storing a set of about 1000 (average) molecules in memory is feasible, don't rely on more. Ideally, don't store more than few hundred molecules at once ... an average application has a lot more things to store beside molecules...each; 1454 molecules created by MoleculeFactory.makeAlkane(100) 2848 molecules created by MoleculeFactory.makeAlkane(50) 4643 molecules created by MoleculeFactory.makeAlkane(30) 6718 molecules created by MoleculeFactory.makeAlkane(20) 12266 molecules created by MoleculeFactory.makeAlkane(10) Molecules with properties - 50 pairs each; 1350 molecules created by MoleculeFactory.makeAlkane(100) 2481 molecules created by MoleculeFactory.makeAlkane(50) 3734 molecules created by MoleculeFactory.makeAlkane(30) 4966 molecules created by MoleculeFactory.makeAlkane(20) 7443 molecules created by MoleculeFactory.makeAlkane(10) Molecules with properties - 200 pairs each; 1154 molecules created by MoleculeFactory.makeAlkane(100) 1885 molecules created by MoleculeFactory.makeAlkane(50) 2527 molecules created by MoleculeFactory.makeAlkane(30) 3050 molecules created by MoleculeFactory.makeAlkane(20) 3831 molecules created by MoleculeFactory.makeAlkane(10) Molecules with properties - 200 pairs each; 1052 molecules created by MoleculeFactory.makeAlkane(100) 1629 molecules created by MoleculeFactory.makeAlkane(50) 2086 molecules created by MoleculeFactory.makeAlkane(30) 2421 molecules created by MoleculeFactory.makeAlkane(20) 2887 molecules created by MoleculeFactory.makeAlkane(10)
public void testMoleculesArrayProperty()
IAtomContainer
s can fit in memory.
So far (1GB RAM)
Molecules with a single property1478 molecules created by MoleculeFactory.makeAlkane(100) 2941 molecules created by MoleculeFactory.makeAlkane(50) 4894 small molecules created by MoleculeFactory.makeAlkane(30) 7257 small molecules created by MoleculeFactory.makeAlkane(20) 14201 small molecules created by MoleculeFactory.makeAlkane(10) Molecules with a single property 1474 molecules created by MoleculeFactory.makeAlkane(100) 2925 molecules created by MoleculeFactory.makeAlkane(50) 4851 small molecules created by MoleculeFactory.makeAlkane(30) 7179 small molecules created by MoleculeFactory.makeAlkane(20) 13840 small molecules created by MoleculeFactory.makeAlkane(10)
Molecules with a single property1432 molecules created by MoleculeFactory.makeAlkane(100) 2755 molecules created by MoleculeFactory.makeAlkane(50) 4404 small molecules created by MoleculeFactory.makeAlkane(30) 6220 small molecules created by MoleculeFactory.makeAlkane(20) 10711 small molecules created by MoleculeFactory.makeAlkane(10) Molecules with a single property 1361 molecules created by MoleculeFactory.makeAlkane(100) 2505 molecules created by MoleculeFactory.makeAlkane(50) 3799 small molecules created by MoleculeFactory.makeAlkane(30) 5084 small molecules created by MoleculeFactory.makeAlkane(20) 7715 small molecules created by MoleculeFactory.makeAlkane(10) Conclusion: Not much difference between double[200] and Double[200], especially for bigger molecules. Definitely better than hashtable of 200 pairs for small molecules, comparable for big molecules.
public void testIterator()
public void testProcessing()
public void test()
public void testLookup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |