frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: ChaosTree – A zero-dependency Java tree library (AVL,RBT,B-Tree,B+Tree)

https://github.com/Chaos-vy/ChaosTree
7•chaos_vy•3h ago
What is ChaosTree?

ChaosTree is a zero-dependency Java Sorted Set/Map library built around multiple tree implementations.

It provides implementations of: - AVL Tree - Red-Black Tree - B-Tree - B+Tree

I have not made my custom API as it implements NavigableSet, NavigableMap, SequencedSet and SequencedMap. My Custome API are: - buildFromSorted(Iterator> it, float factor) - importFlatMatrix(Object[][] blast, float factor) - Object[][] exportFlatMatrix()

I started ChaosTree because I wanted to explore how far I could learn DS structure, It started as frst release of 7 tree of Set type with Custome API, As i got engrossed into it I moved to Map, During phase of switching from Set to Map there was drastic change and knowledge upgrade where I pushed my Tree limit from jdk11+ support to jdk21+ where paid close attention to dependency-free and memory layout, allocation,JVM behavior, and real-world performance.

Some of the things I experimented with: - Different node layouts and metadata footprints - CRTP/F-bounded polymorphism for tree implementations - Parent-pointer vs parentless nodes - Array-based N-ary tree nodes - B-Tree/B+Tree degree selection - JMH benchmarking and JFR profiling - Differential/randomized testing against java.util.TreeMap/TreeSet

After this rough and tough It also passes these test:

-Guava Testlib compatibility testing -jqwik property-based testing -Randomized differential testing against reference collections -White-box structural validation of tree nodes -Direct validation of B-Tree/B+Tree structural invariants -Exception and iterator-contract testing -Serialization and cloning tests -Nary Tree uses custom jqwick test of API validation as well.

Tail latency behavior is not shown here because it get's truncated into a simple text which made the dat read wrong:https://chaos-vy.github.io/ChaosTree/utils/JMH-Report.html I have also ran benchmark with official JDK TreeMapUpdate to my N-ary tree.

GitHub: https://github.com/Chaos-vy/ChaosTree https://chaos-vy.github.io/ChaosTree/

I'd especially like feedback on the API design, implementation choices, benchmark methodology. I am currently trying to truncate useless and complex branches for performnace tuning.

Comments

MiroslavPokorny•3h ago
Does this really need to be JDK 21 ?

I personally require libs that are JDK 11.

chaos_vy•2h ago
It uses sealed classes, JDK21 SequencedSet and SequencedMap implementation, Math.clamp(), and get benifit from modern JIT optimization.
MiroslavPokorny•1h ago
That not much to jump all the way to jdk21.

Math.clamp is literally 2 / 3 lines.

chaos_vy•1h ago
The Tree Supports JEP431(Sequenced Collection) and my whole node structure is based on pattern match and sealed classes.
pron•46m ago
Upgrading JDK versions isn't all that much work, and it offers very significant benefits especially when it comes to performance. Applications that don't upgrade don't have the resources to do even that; they're in minimal maintenance mode. Does it make sense, then, for a library that offers some new feature that requires at least some code changes in the application to use, to target users who don't have the resources even for a runtime upgrade?

Applications that don't upgrade their runtime are usually not in the market for new libraries (or even new features in old libraries).

my-next-account
•
25m ago
You should add an intrusive variant of all the trees.
chaos_vy•13m ago
Intrusive trees are great for specialized use cases, but not for a general-purpose Java Collection. If the payload owns the left/right pointers, the same object can't cleanly participate in multiple Maps/Sets.

ChaosTree keeps the tree topology separate from the domain objects, which is necessary for a NavigableMap-style collection.

my-next-account•4m ago
You can have both! You can of course implement the non-intrusive case on top of the intrusive one. I think that opens up interesting use cases with Valhalla.

Show HN: Kinesis – Control your Mac with the Meta Neural Band

https://github.com/callbacked/kinesis
59•callbacked•1h ago•18 comments

EuroBirdPortal – Live bird movements across Europe

https://www.eurobirdportal.org/ebp/en/
143•NKosmatos•5h ago•48 comments

Fable 5.1 Solves the Cyphral Distich, a 370-year-old cipher

https://www.vals.ai/blogs/fable-solves-cyphral-distich
1090•u1hcw9nx•16h ago•494 comments

A 386 PC for Your RP2350

https://github.com/rh1tech/frank-386
106•SamuraiLion•5h ago•28 comments

An atlas of periodic solutions to the three-body problem

https://www.threebodyorbits.com/
118•danielmorozoff•2d ago•29 comments

Apple's Siri AI Can Be Swapped Out for Claude, ChatGPT, Code Shows

https://www.macrumors.com/2026/09/14/siri-can-be-swapped-out-for-chatgpt-claude/
79•tosh•1h ago•23 comments

OpenArch – PyTorch implementations of modern LLM architectures

https://github.com/anuj0456/OpenArch
82•anuj0456•5h ago•15 comments

Drawably: Hand-Drawn UI Controls

https://github.com/Danilaa1/drawably
17•ingve•4d ago•11 comments

Devil's Arrows: Ancient builders hauled 55k-lb stones 11 miles for UK stone row

https://www.sciencedaily.com/releases/2026/09/260909005152.htm
8•bookofjoe•2d ago•4 comments

Registration without a phone number on Signal will use zero-knowledge proofs

https://community.signalusers.org/t/registration-without-a-phone-number/2222?page=10
333•Cider9986•15h ago•166 comments

Texas judge rules TikTok misled users on child safety feature

https://www.reuters.com/legal/litigation/texas-judge-rules-tiktok-misled-users-child-safety-featu...
26•1vuio0pswjnm7•1h ago•1 comments

Spaceships (Reverse Asteroid)

https://spaceships.treybastian.com/
290•zdw•4d ago•55 comments

Apple's Dimensional Drawings

https://developer.apple.com/accessories/dimensional-drawings/
283•herbertl•13h ago•93 comments

What a time to be alive – rouge AI agents attack RubyGems.org

https://tenderlovemaking.com/2026/09/11/what-a-time-to-be-alive/
66•gregnavis•59m ago•74 comments

Volkswagen Just Built an EV That Can Go Nearly 900 Miles on a Charge

https://www.motor1.com/news/808114/vw-mission-efficiency-concept-specs-photos/
15•thelastgallon•25m ago•2 comments

The case against JPEG XL

https://giannirosato.com/blog/post/case-against-jxl/
211•contact9879•12h ago•279 comments

Watch AI materials-science and bioscience abilities closely

https://www.lesswrong.com/posts/SCtkSz4nQ9icLZ4uq/watch-ai-materials-science-and-bioscience-abili...
35•joozio•2h ago•38 comments

XCancel suspended "due to a new development in the ongoing legal proceedings"

https://xcancel.com/twitter
153•unfocso•1h ago•124 comments

A Vacuum Diode for Make: Magazine

https://www.nickpoole.me/2023/12/10/a-vacuum-diode-for-make-magazine/
22•luu•3d ago•2 comments

Mullenweg has returned as CEO after attempted board ouster

https://techcrunch.com/2026/09/12/automattic-confirms-mullenweg-has-returned-as-ceo-after-attempt...
220•ilamont•17h ago•295 comments

Ask HN: What are you working on? (September 2026)

222•david927•20h ago•653 comments

Rope, twine and thread: Invisible technologies of the Stone Age

https://knowablemagazine.org/content/article/society/2026/prehistory-lost-threads
98•knowablemag•2d ago•38 comments

Julia 1.13 highlights

https://julialang.org/blog/2026/09/julia-1.13-highlights/
254•eigenspace•4d ago•40 comments

Bad benchmarks and evals: Senior SWE-Bench, napkin math, and winter tires

https://danluu.com/exercise-7/
47•luu•3d ago•31 comments

Why is Google still serving dodgy ads?

https://www.atomic14.com/2026/09/13/why-is-google-still-serving-dodgy-ads
888•iamflimflam1•20h ago•384 comments

The GDR and Vietnam: From Fake Coffee to Coffee Empire

https://www.katjahoyer.uk/p/the-gdr-and-vietnam-from-fake-coffee
98•NaOH•3d ago•56 comments

Show HN: 1080p is 920px tall – 1k real browser viewports

https://screensize.net/reports/viewport-stats
33•zenpe•6h ago•19 comments

Show HN: ChaosTree – A zero-dependency Java tree library (AVL,RBT,B-Tree,B+Tree)

https://github.com/Chaos-vy/ChaosTree
7•chaos_vy•3h ago•8 comments

Big AI sets out its terms for regulatory capture

https://www.theregister.com/ai-and-ml/2026/09/14/big-ai-sets-out-its-terms-for-regulatory-capture...
26•joebuckwilliams•3h ago•0 comments

Flawed routers flood University of Wisconsin internet time server (2003)

https://pages.cs.wisc.edu/~plonka/netgear-sntp/
100•walrus01•17h ago•12 comments