@Test
    public void testCompPerformance() {
        int size = 100000;
        int[] inVals = Permutation.randomPermutation(size);
        int testVal = inVals[size / 2];
        TreeMap<Integer, Integer> treeMap = new TreeMap<Integer, Integer>(comp);
        long t1 = System.currentTimeMillis();
        for (int i = 0; i < inVals.length; i++) {
            treeMap.put(inVals[i], inVals[i]);
        }
        long t2 = System.currentTimeMillis();
        System.out.println(String.format("TreeMap loaded %d items in %d ms.", size, t2 - t1));

        RedBlackTree<Integer, Integer> rbTree = new RedBlackTree<Integer, Integer>(comp);
        t1 = System.currentTimeMillis();
        for (int i = 0; i < inVals.length; i++) {
            rbTree.insert(inVals[i], inVals[i]);
        }
        t2 = System.currentTimeMillis();
        System.out.println(String.format("RedBlackTree loaded %d items in %d ms.", size, t2 - t1));


        t1 = System.nanoTime();
        Integer v = rbTree.get(testVal);
        t2 = System.nanoTime();
        System.out.println(String.format("RBT found key in %d ms", (t2 - t1) / 1000));


        t1 = System.nanoTime();
        v = treeMap.get(testVal);
        t2 = System.nanoTime();
        System.out.println(String.format("TreeMap found key in %d ms", (t2 - t1) / 1000));

        t1 = System.nanoTime();
        int removeSize = size / 10;
        for (int i = 0; i < removeSize; i++) {
            treeMap.remove(inVals[i]);
        }
        t2 = System.nanoTime();
        System.out.println(String.format("Treemap removed %d in %d ms.", removeSize, (t2 - t1) / 1000));

        t1 = System.nanoTime();
        for (int i = 0; i < removeSize; i++) {
            rbTree.delete(inVals[i]);
        }
        t2 = System.nanoTime();
        System.out.println(String.format("RedBlackTree removed %d in %d ms.", removeSize, (t2 - t1) / 1000));

        assertTrue(rbTree.checkRedBlack());

    }