Browse Clojure Foundations for Java Developers

Efficient Use of Data Structures

Pick the right persistent collection, and use transients only when profiling proves it helps.

Persistent data structures are one of Clojure’s biggest engineering wins: they’re immutable, thread-friendly, and still efficient because updates share structure rather than copying everything.

This section helps you choose collections with the same care you would in Java (vector vs list, hash-map vs array-map, set vs map-as-set), and understand the performance shape of common operations.

When it really matters, you’ll also learn when to reach for transients and other allocation-reduction techniques—and when that would be premature complexity.

In this section

Revised on Friday, April 24, 2026