You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Aleksey Shipilev (JIRA)" <ji...@apache.org> on 2008/03/23 22:25:28 UTC
[jira] Created: (HARMONY-5638) [drlvm][performance] String.intern()
should use unsynchronized fast-path
[drlvm][performance] String.intern() should use unsynchronized fast-path
------------------------------------------------------------------------
Key: HARMONY-5638
URL: https://issues.apache.org/jira/browse/HARMONY-5638
Project: Harmony
Issue Type: Improvement
Reporter: Aleksey Shipilev
Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5638) [drlvm][performance] String.intern()
should use unsynchronized fast-path
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Shipilev updated HARMONY-5638:
--------------------------------------
Issue Type: Sub-task (was: Improvement)
Parent: HARMONY-5632
> [drlvm][performance] String.intern() should use unsynchronized fast-path
> ------------------------------------------------------------------------
>
> Key: HARMONY-5638
> URL: https://issues.apache.org/jira/browse/HARMONY-5638
> Project: Harmony
> Issue Type: Sub-task
> Reporter: Aleksey Shipilev
> Attachments: 0006-serial-vmInternString.patch
>
>
> Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5638) [drlvm][performance]
String.intern() should use unsynchronized fast-path
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590026#action_12590026 ]
Nathan Beyer commented on HARMONY-5638:
---------------------------------------
This patch isn't safe. Are there any planned changes for this patch?
> [drlvm][performance] String.intern() should use unsynchronized fast-path
> ------------------------------------------------------------------------
>
> Key: HARMONY-5638
> URL: https://issues.apache.org/jira/browse/HARMONY-5638
> Project: Harmony
> Issue Type: Sub-task
> Reporter: Aleksey Shipilev
> Attachments: 0006-serial-vmInternString.patch
>
>
> Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5638) [drlvm][performance]
String.intern() should use unsynchronized fast-path
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590034#action_12590034 ]
Aleksey Shipilev commented on HARMONY-5638:
-------------------------------------------
Yes, this patch is not safe and marked as proof-of-concept.
There's no budget for implementing clean patch right now.
> [drlvm][performance] String.intern() should use unsynchronized fast-path
> ------------------------------------------------------------------------
>
> Key: HARMONY-5638
> URL: https://issues.apache.org/jira/browse/HARMONY-5638
> Project: Harmony
> Issue Type: Sub-task
> Reporter: Aleksey Shipilev
> Attachments: 0006-serial-vmInternString.patch
>
>
> Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5638) [drlvm][performance] String.intern()
should use unsynchronized fast-path
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Beyer updated HARMONY-5638:
----------------------------------
Priority: Trivial (was: Major)
I'm dropping the priority; "proof of concept" doesn't get a major priority.
> [drlvm][performance] String.intern() should use unsynchronized fast-path
> ------------------------------------------------------------------------
>
> Key: HARMONY-5638
> URL: https://issues.apache.org/jira/browse/HARMONY-5638
> Project: Harmony
> Issue Type: Sub-task
> Reporter: Aleksey Shipilev
> Priority: Trivial
> Attachments: 0006-serial-vmInternString.patch
>
>
> Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5638) [drlvm][performance] String.intern()
should use unsynchronized fast-path
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Shipilev updated HARMONY-5638:
--------------------------------------
Attachment: 0006-serial-vmInternString.patch
0006-serial-vmInternString.patch
Proof-of-concept patch.
Eliminates 30% of contended locks for SerialBench, might improve the startup performance.
However, it has some pitfalls, at least rehash() can occur while tryIntern() thus resulting in NPE.
> [drlvm][performance] String.intern() should use unsynchronized fast-path
> ------------------------------------------------------------------------
>
> Key: HARMONY-5638
> URL: https://issues.apache.org/jira/browse/HARMONY-5638
> Project: Harmony
> Issue Type: Improvement
> Reporter: Aleksey Shipilev
> Attachments: 0006-serial-vmInternString.patch
>
>
> Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5638) [drlvm][performance]
String.intern() should use unsynchronized fast-path
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581529#action_12581529 ]
Alexey Varlamov commented on HARMONY-5638:
------------------------------------------
Looks like this is exploiting "double checking lock" idiom, which is knonw unsafe for Java [1].
[1] http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
> [drlvm][performance] String.intern() should use unsynchronized fast-path
> ------------------------------------------------------------------------
>
> Key: HARMONY-5638
> URL: https://issues.apache.org/jira/browse/HARMONY-5638
> Project: Harmony
> Issue Type: Improvement
> Reporter: Aleksey Shipilev
> Attachments: 0006-serial-vmInternString.patch
>
>
> Current implementation on String.intern() synchronizes on entire put operation. Given the perspective large fraction of the strings are already interned, we might implement the fast-path lookup as unsynchronized part of put().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.