Re:Player of Games
by penteract on Wednesday December 08, 2021 @08:49AM
(#29484631)
It's a good set of abstractions, but I've found that the system used for immutability (immerjs) carries noticable performance costs (a factor of more than 2), to the point that it was faster to make a mutable copy of almost all the gamestate at the start of the 'apply move' code.
[ Parent
| on HN ]
Re:Player of Games
by mathgladiator on Wednesday December 08, 2021 @06:43PM
(#29492084)
For Adama ( http://www.adama-lang.org/ ), I am using a mutable tree with two copies and then built transactions such that I can emit deltas on the parts that change. I have all the benefits of immutability without the cost PLUS I have a cheap undo/redo log.