-
Notifications
You must be signed in to change notification settings - Fork 84
Reduce compile target to Java 5, address serialization issues and improve performance #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…verhead of calls within internal API which are assumed to be correct.
…lue where from a ConcurrentRadixTree. By avoiding this allocation, looking up a large chunk of values can be done with less GC overhead. Escape analysis on the JVM is unfortunately rather limited such that this allocation is not properly avoided by the JIT in many cases. If this allocation ends up on the hot path, its collection can have a visible impact on throughput.
…r char-index and length resolution. Ideally, the allocations are removed by escape analysis but the mechanism does not always work as expected such that search can cause significant allocation.
Allocations can trigger significant garbage collection if not erased by escape analysis.
…d of using fallback.
…decendent nodes. Unfortunately, the AbstractReferenceArray API and List API are incompatible due to the conflicting signatures of set(int,Object) where one returns a boolean and another declares void. To avoid this conflict, an API is introduced that implements the minimal required functionality but allows a single object to represent any interaction with child nodes. This way, non-leaf nodes do no longer require an additional field to carry the list wrapper, reducing the memory consumption of a tree with many non-leaf nodes.
|
LOL, Raphel. Just met you this weekend and the first thing to hit me on Monday afternoon when browsing my open tabs is this. Did you publish the fork in the end? This has not seen updates in six years and seems unmaintained. |
|
Small world! I have not, unfortunately. But I would certainly consider it. Do you have a need for it? |
|
No, I think the current version is sufficient for our needs, but would of course not say no to an actively maintained version, so was just wondering if I could point my pom file to no.winterhalter or something. But no worries, I am good 😄 |
|
FWIW, for a narrow use case I was looking for an efficient adaptive radix tree (ART) implementation in Java and ended up rolling my own: https://github.com/openrewrite/rewrite/blob/8bd3573ee495863d320d1a5511391b63b1e76886/rewrite-core/src/main/java/org/openrewrite/internal/AdaptiveRadixTree.java. it isn't thread-safe and doesn't support deletes (as I didn't need that), but that can be added. It has zero dependencies, is all in a single compilation unit, and offers fairly good insert and lookup performance. |
Thanks for this library, I have not found an equally comprehensive standalone implementation of a radix tree for Java, I really appreciate that you put this out!
I was planning to use this tree for a tool that I develop and I was wondering if you would consider this pull request with the following changed:
SetForMap. I added a build plugin to validate that no Java 6+ signatures are used to assure that in-compliant API use would be discovered upon building the project.Let me know what you think of this and if you wanted me to reduce this request. I hoped I could get my changes upstream to avoid building my own fork but I also understand if you have a different opinion. Looking forward to hearing back! Rafael