[ 
https://issues.apache.org/jira/browse/GROOVY-11649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949486#comment-17949486
 ] 

ASF GitHub Bot commented on GROOVY-11649:
-----------------------------------------

dongwq commented on PR #2210:
URL: https://github.com/apache/groovy/pull/2210#issuecomment-2851503770

   > Also, was there anything in particular you used from `AbstractList`. 
Wondering why not to use the more general `List` interface?
   
   cause partition_point is O(logn),  suppose that element.get(i) is O(1).  so 
here we need a "random access" data store (such as an array).  
   
   the java doc says for AbstractList:
    * This class provides a skeletal implementation of the {@link List}
    * interface to minimize the effort required to implement this interface
    * backed by a "random access" data store (such as an array)
    
   though there no actual limit in java collection framework.
    




> Create partitionPoint extension method variants
> -----------------------------------------------
>
>                 Key: GROOVY-11649
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11649
>             Project: Groovy
>          Issue Type: New Feature
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 5.x
>
>
> See: https://github.com/apache/groovy/pull/2210
> * rust: 
> https://doc.rust-lang.org/std/primitive.slice.html#method.partition_point
> * c++: https://en.cppreference.com/w/cpp/algorithm/ranges/partition_point
> * python: https://docs.python.org/3/library/bisect.html#module-bisect



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to