harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5040) [drlvm][classloader] Java field ordering must be preserved
Date Fri, 16 Nov 2007 08:21:43 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542994
] 

Pavel Pervov commented on HARMONY-5040:
---------------------------------------

I've tried to make qsort stable but stumpled in unpredictable difficulties and returned to
attached patch.

The good thing is that the fixed patch is ready. I'll attach it in a few minutes.

The bad thing is that instance fields are stored in reverse order when read from class file.
I'll try to solve this as this also affects the performance. I'll try to solve this in a way
that does not affect the performance. :)

> [drlvm][classloader] Java field ordering must be preserved
> ----------------------------------------------------------
>
>                 Key: HARMONY-5040
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5040
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Gregory Shimansky
>         Attachments: fo-stable-1.patch, fo-stable-1.patch, fo-stable-1.patch
>
>
> Current implementation of class support in Harmony sorts the class fields decrementally
by size to avoid misalignment. However, it's done with quicksort which is known to be unstable
(e.g. there are no guarantees that order of elements with equal keys will not be changed).
That lead to shaking Java field order which could be optimized to achieve the spatial locality.

> Proposed patch changes the sorting algorithm to bubblesort, which is known to be stable.
That's performance-safe since average field count is not high.

-- 
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