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

Ted Yu updated KYLIN-3095:
--------------------------
    Description: 
Use ArrayDeque instead of LinkedList for queue implementation where thread 
safety is not needed.

>From https://docs.oracle.com/javase/7/docs/api/java/util/ArrayDeque.html
{quote}
Resizable-array implementation of the Deque interface. Array deques have no 
capacity restrictions; they grow as necessary to support usage. They are not 
thread-safe; in the absence of external synchronization, they do not support 
concurrent access by multiple threads. Null elements are prohibited. This class 
is likely to be faster than Stack when used as a stack, and *faster than 
LinkedList when used as a queue.*
{quote}

  was:
Use ArrayDeque instead of LinkedList for queue implementation where thread 
safety is not needed.

>From https://docs.oracle.com/javase/7/docs/api/java/util/ArrayDeque.html

{quote}
Resizable-array implementation of the Deque interface. Array deques have no 
capacity restrictions; they grow as necessary to support usage. They are not 
thread-safe; in the absence of external synchronization, they do not support 
concurrent access by multiple threads. Null elements are prohibited. This class 
is likely to be faster than Stack when used as a stack, and *faster than 
LinkedList when used as a queue.*
{quote}


> Use ArrayDeque instead of LinkedList for queue implementation
> -------------------------------------------------------------
>
>                 Key: KYLIN-3095
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3095
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee:  Kaige Liu
>            Priority: Minor
>              Labels: parallel
>             Fix For: Backlog
>
>
> Use ArrayDeque instead of LinkedList for queue implementation where thread 
> safety is not needed.
> From https://docs.oracle.com/javase/7/docs/api/java/util/ArrayDeque.html
> {quote}
> Resizable-array implementation of the Deque interface. Array deques have no 
> capacity restrictions; they grow as necessary to support usage. They are not 
> thread-safe; in the absence of external synchronization, they do not support 
> concurrent access by multiple threads. Null elements are prohibited. This 
> class is likely to be faster than Stack when used as a stack, and *faster 
> than LinkedList when used as a queue.*
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to