[squeak-dev] How immutable data structures can _increase_
application performance
Levente Uzonyi
leves at elte.hu
Mon Dec 23 00:43:10 UTC 2013
On Sun, 22 Dec 2013, Frank Shearar wrote:
> http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/
>
> In which David Nolen shows how |UIs built with persistent data
> structures outperform those using mutable state, simply because you
> can check for changes with a simple reference equality check. And you
> get undo for free, and snapshots are trivial. And, because decent
> persistent data structures share structure, it's memory efficient.
According to my benchmarks (and my memory) the immutable binary trees
(and other non-binary tree structures) I've built were all about 6x slower
than mutable ones. Spur might make a difference, because the extra cost
comes mostly from GC. But currently a mutable tree with a semaphore is way
faster.
Levente
>
> frank
>
>
More information about the Squeak-dev
mailing list
|