harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-3392) [Classlib][luni][performance] Improvement of java.lang.(Ineteger,Short,Long,Character).valueOf() methods
Date Wed, 14 Mar 2007 11:04:09 GMT

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

Alexey Petrenko reassigned HARMONY-3392:

    Assignee: Alexey Petrenko

> [Classlib][luni][performance] Improvement of java.lang.(Ineteger,Short,Long,Character).valueOf()
> --------------------------------------------------------------------------------------------------------
>                 Key: HARMONY-3392
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3392
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>         Environment: All
>            Reporter: Sergey Kuksenko
>         Assigned To: Alexey Petrenko
>         Attachments: luni_caches.patch
> Performance optimization done for the methods:
> java.lang.Short.valueOf(), java.lang.Character.valueOf(),java.lang.Integer.valueOf(),
> Currently, small values are cached for these wrappers. Implementation of caching is rather
ineffective, because of presence of synchronization. If several threads creates wrappers (boxing)
it may cause unnecessary synchronization contention and performance degradation. Attached
patch contains correct modification of  "valueOf" methods, all unnecessary synchronizations
are removed.
> Also, it makes sense to remove object comparisons ("this==object") from "equals" methods.
For such small wrappers, it is much faster and easier to compare wrapped values without preliminary
reference comparison.
> Besides, the patch fixes HARMONY-2454 issue.

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

View raw message