posted 13 years ago
I think mutable data structures are less likely to need laziness internally in order to achieve their desired performance. On the other hand, laziness at it's core is just delayed execution, which is fairly simple to build in any language that supports closures. It would be possible, for example, to build a lazy seq like Clojure has in JavaScript which doesn't exactly encourage immutability at the language level.
Do you mean internal algorithms? Clojure's persistent sorted map is built on a persistent version of a red-black tree, which has many similarities to a mutable red-black tree, so in this case the internal algorithms are very similar. Clojure persistent hash map, however, has a very different structure internally compared to most mutable hash tables, and likewise very different internal algorithms.
On the other hand, the performance provided by Clojure's persistent collections are close to what you'd expect of their mutable cousins, so the algorithms and situations in which one would use Clojure's hash or sorted maps are likely very similar to where you'd use mutable versions in an imperative program.