Re:Functional data structures in JavaScript with Mori
by swannodette on Monday November 11, 2013 @05:06PM
(#6714408)
One nifty thing not covered here is that Mori also has an extremely efficient O(1) thaw to get a mutable copy of an immutable value and a O(1) freeze to get a persistent value from a mutable data structure (transient).
The performance of a transient vector is shockingly close to using a JavaScript array under Google V8 for adding new elements:
The performance of a transient vector is shockingly close to using a JavaScript array under Google V8 for adding new elements:
http://github.com/swannodette/mori#efficient-freezethaw