Hacker News new | ask | show | jobs
by fqsxr 3123 days ago
I like immutable objects. But my worry is it will lead to lots of small objects being created just to get destroyed right away, putting lots of pressure on GC. I wonder if this is a known issue in the immutable js community.
2 comments

When you insert into an immutablejs collection, a copy is not made. It's reusing a reference to the old object. That means iteration is a bit slower while insertion and similar operations is faster, which is an acceptable tradeoff
GC?
GameCube
Garbage Collection
Garbage Collector