I hear about how immutable structures are awesome but here's the thing, you want millions of ops/second? You need to stop allocating memory.
33
88
104
@aphyr @kellabyte Generalizations gonna generalize
1
5
@seancribbs @aphyr memory allocations are so expensive. Even with arena/slab allocators.
2
@kellabyte @aphyr No doubt, but just because you use immutable data-structures does not imply you're necessarily using too much RAM.
2
@seancribbs @aphyr I didn't say anything about using too much RAM, it's the CPU time spent to use the memory.
2
@kellabyte @aphyr Everything has to allocate at some point, but your original tweet implied that immutable datastructures are hogs by design
1
@kellabyte @aphyr My point is, it won't be a hog if you aren't changing anything ;)
1
@seancribbs @aphyr True. But if you're not changing anything you might as well just pass a pointer.
1
@kellabyte @aphyr I guess it's just hard for me to agree that *in general* immutable structures can't perform as well.
1
@kellabyte @aphyr There are too many interrelated factors.
1
Replying to @seancribbs
@seancribbs @kellabyte @aphyr Clojure鈥檚 transient seem like a good way to handle this clojure.org/transients

Jan 6, 2015 路 5:16 PM UTC