Class ComparatorPerformance

java.lang.Object
org.gbif.utils.text.ComparatorPerformance

public class ComparatorPerformance extends Object
Author:
markus
  • Constructor Details

  • Method Details

    • testFileSorting

      @Test public void testFileSorting() throws IOException
      Comparing performance for various file soring methods.

      Executed on a MacPro with 9GB, 8-core 3GHz and 1TB disk sorting a 207MB large text file made from concatenation of irmng.tail:

      Sorting with unix sort took 5817 ms Sorting with org.gbif.utils.text.StringComparator and 10k lines in memory (200 parts) took 48968 ms Sorting with org.gbif.utils.text.CCollationComparator and 10k lines in memory (200 parts) took 49858 ms Sorting with org.gbif.utils.text.StringComparator and 100k lines in memory (20 parts) took 17962 ms Sorting with org.gbif.utils.text.CCollationComparator and 100k lines in memory (20 parts) took 14046 ms Sorting with org.gbif.utils.text.StringComparator and 1000k lines in memory (2 parts) took 15492 ms Sorting with org.gbif.utils.text.CCollationComparator and 1000k lines in memory (2 parts) took 14317 ms

      Throws:
      IOException
    • testVariousComparators

      @Test public void testVariousComparators() throws IOException
      Throws:
      IOException