## DEV Community is a community of 550,319 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

# Discussion on: What happened to Immutable.JS? And how can we react?

## Replies for: This comment got way too long, sorry. I'm using persistent data strucutres in node and gain both performance benefits and purity. However, I'd say...

Aleksei Berezkin

Thanks for sharing links. While linked lists definitely have their usage, we must keep in mind that access by index costs $O(n)$ for them. Yet, because each item produces additional object(s), memory fragmentation increases.

Ordered map is indeed a problem in JS, and devs should either implement it, or use some lib, or just order and array of [key, value] tuples. Which is best? It depends 🙂

Iven Marquardt

You're right. However, I think index based access is overrated, because you don't need it that often.

Btw. I don't think immer.js is a good solution, because it doesn't seem to compose.