Re: [collections]

2024-04-09 Thread Rodion Efremov
Hello, Fair enough. However, why we have CursorableLinkedList and NodeCachingLinkedList around when my previous benchmarking showed that they are inferior compated to both TreeList and IndexedLinkedList? Also, note that TreeList requires 3 references, 2 ints and 2 booleans per node.

Re: commons.text.CaseUtils

2024-04-09 Thread Stephan Peters
OK, I will initiate a PR. Some of the added methods will be more useful than others. The PR will come from speters33w. Thank you, Stephan Peters On Tue, Apr 9, 2024 at 5:31 PM Gary Gregory wrote: > Hello Stephan, > > The best way to see what you are proposing is a PR, it's a bit painful to >

Re: commons.text.CaseUtils

2024-04-09 Thread Gary Gregory
Hello Stephan, The best way to see what you are proposing is a PR, it's a bit painful to see differences otherwise, at least for me. That said anything new should solve a real world use case, not merely something that might be useful (or not)  I think seeing tests in a PR will help clarify

commons.text.CaseUtils

2024-04-09 Thread Stephan Peters
I added several methods to the org.apache.commons.CaseUtils class I think would be very useful, for example to use for normalized naming conventions for file paths, file names, URLs, etc. I'm planning on initiating a pull request. I would like to discuss it here. I've posted it in a fork here:

Re: [collections]

2024-04-09 Thread Gary Gregory
Hm... how about all the existing "Linked" classes in the JRE: java.util.LinkedList and so on. Gary On Tue, Apr 9, 2024 at 2:50 PM Elliotte Rusty Harold wrote: > > How does it compare to a simple array or ArrayList? Given modern CPU > architecture and caching, I rarely encounter real world use

Re: [collections]

2024-04-09 Thread Elliotte Rusty Harold
How does it compare to a simple array or ArrayList? Given modern CPU architecture and caching, I rarely encounter real world use cases where a linked list outperforms an array list, no matter what the data structures textbooks say. Maybe on very large lists with a lot of mutations, though last I

[collections]

2024-04-09 Thread Rodion Efremov
Good day, I would like to propose a Deque/List that is implemented as a doubly linked list with a sublinear index speeding up single-element operations to (likely) O(sqrt(n)). It passes a benchmark faster than TreeList by the factor of around 5. The data structure is hosted in GitHub:

[ANNOUNCE] Apache Commons IO 2.16.1

2024-04-09 Thread Gary Gregory
The Apache Commons team is pleased to announce Apache Commons IO 2.16.1. The Apache Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more. Java 8 is required. Fixed Bugs -- o

Re: [Collections-BloomFilter][Discuss] missing functionality?

2024-04-09 Thread Claude Warren
Alex, I like your solution. To answer your question. We create a BloomFilter that has a timestamp associated with it. When the timestamp is greater than System.currentTimeMillis() the filter is removed. The custom cleanup calls Cleanup.removeEmptyTarget().andThen() I think that creating a

Re: [Collections-BloomFilter][Discuss] missing functionality?

2024-04-09 Thread Alex Herbert
Hi Claude, Q. What is your current clean-up filter, i.e. the Consumer>? I assume you are using a custom one. The current collections code only has 2 functional implementations. One will remove the newest filter if it is empty, one will remove the oldest filters until the size is below a limit.

[Collections-BloomFilter][Discuss] missing functionality?

2024-04-09 Thread Claude Warren
Greetings, I am attempting to use the Bloomfilter code in Kafka to manage PID generation. The requirement is to remove pid tracking after a period of time. This is possible with the LayeredBloomFilter but it has an edge case problem. The LayeredBloomFilter uses the LayerManager to manage the