FileDocCategorySizeDatePackage
HashsizeTest.javaAPI DocExample856Wed May 31 21:59:50 BST 2000tuning.hash

HashsizeTest

public class HashsizeTest extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    Dict.initialize(true);
    for (int i = 5; i > 0 ; i--)
    {
      test(89);
      test(101);
      test(101);
      test(89);
    }
  
public static voidtest(int size)

    long time = System.currentTimeMillis();
    for (int i = 10; i > 0 ; i--)
      test1(size);
    time = System.currentTimeMillis() - time;
    System.out.println(size + " size, time: " + time);
  
public static voidtest1(int size)

    HashMap h = new HashMap(size);
    for (int i = Dict.DICT.length-1; i >=0 ; i--)
      h.put(Dict.DICT[i], Boolean.TRUE);
    Object o;
    for (int i = Dict.DICT.length-1; i >=0 ; i--)
      o = h.get(Dict.DICT[i]);