harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-636) performance enhancement for Arrays.sort(Object[]...)
Date Tue, 04 Jul 2006 11:21:30 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-636?page=comments#action_12419089 ] 

Tim Ellison commented on HARMONY-636:
-------------------------------------

(continuation of previous comment)

java.lang.NullPointerException at tests.api.java.util.ArraysTest$ReversedIntegerComparator.compare(ArraysTest.java:28)
at java.util.Arrays.mergeSort(Arrays.java:2297) at java.util.Arrays.mergeSort(Arrays.java:2309)
at java.util.Arrays.mergeSort(Arrays.java:2309) at java.util.Arrays.mergeSort(Arrays.java:2310)
at java.util.Arrays.sort(Arrays.java:2663) at java.util.Arrays.sort(Arrays.java:2652) at tests.api.java.util.ArraysTest.test_sort$Ljava_lang_ObjectIILjava_util_Comparator(ArraysTest.java:1257)


The test case source can be found here
    http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/ArraysTest.java?view=markup

then search in there for "test_sort$Ljava_lang_ObjectIILjava_util_Comparator()"


Please can you take a look and figure out the cause.



> performance enhancement for Arrays.sort(Object[]...)
> ----------------------------------------------------
>
>          Key: HARMONY-636
>          URL: http://issues.apache.org/jira/browse/HARMONY-636
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Rustem Rafikov
>     Assignee: Tim Ellison
>     Priority: Minor
>  Attachments: Arrays.objectsort.07042006.zip, Arrays_objectsort_patch.zip
>
> Dear All,
> I would like to suggest a patch improving performance of object's sorting algorithms.
> Actually the algorithm suggested uses different methods for sorting objects and strings:
> 1.	Object's sorting uses adaptive merge-sort. It works much faster for nearly sorted
arrays.
> 2.	String's sorting algorithms are specially tuned for strings.
> Attached zip contains the patch itself and a micro benchmark.
> The micro-bench loads 100000 strings from aspell dictionary (you can find it in /usr/lib/aspell,
for example: english-med-only), makes it sorted with different degree and then sort it. 
> Even though this patch adds a lot of code lines instead of a little piece of original
code, the test shows performance improvement as much as 45% for objects and 50% for strings.
> Thanks, 
> Rustem

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message