harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-4551) [drlvm][gc_gen][perf]improvement for System.identityHashCode method
Date Fri, 11 Apr 2008 01:04:06 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiao-Feng Li reassigned HARMONY-4551:
-------------------------------------

    Assignee: Xiao-Feng Li

> [drlvm][gc_gen][perf]improvement for System.identityHashCode method
> -------------------------------------------------------------------
>
>                 Key: HARMONY-4551
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4551
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Vladimir Strigun
>            Assignee: Xiao-Feng Li
>         Attachments: hashcode_helper_inline_patch.patch, hashcode_helper_new.patch
>
>
> System.identityHashCode could be faster if implemented via vmmagic code. 
> The next implementation shows significant speedup on small testcase (from 1609 msec for
un-patched version to 409 msec on patched one):
> return ObjectReference.fromObject(object).toAddress().toInt()
> Small test:
> public class Test {
>     public static void main(String[] args) {
>         runTest(1000, new Object());
>         long start = System.currentTimeMillis();
>         runTest(10000000, new Object());
>         long end = System.currentTimeMillis() - start;
>         System.out.println("completed in "+end);
>     }
>     public static void runTest(int num, Object obj) {
>         for(int i=0; i<num; i++) {
>             System.identityHashCode(new Object());
>         }
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message