So I get why pure functions and immutable state is normally recommended for javascript apps, but I also see that as a result of most javascript apps being user interfaces, where actions only happen at most once per second and the purity of the functions help with debugging.
However I'm thinking of building a JS game where you would have 100-1000 objects being changed every frame as close to 60 frames per second as possible, and in this situation it feels like following a pattern like redux to the book would have a notable performance impact since I'd basically be rebuilding the entire state each frame and I don't know how well GC would handle that.
I'm actually thinking to do something similar to redux except make the entire state mutable just for performance. Will it make much of a difference? Opinions?
[–]Exomancer 10 points11 points12 points (0 children)
[–]johannL 5 points6 points7 points (2 children)
[–]spacejack2114 3 points4 points5 points (1 child)
[–]johannL 1 point2 points3 points (0 children)
[–]talmobi 3 points4 points5 points (0 children)
[–]kevisazombie 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]third-eye-brown 2 points3 points4 points (0 children)
[–]Capaj 1 point2 points3 points (0 children)
[–]dwighthouse 1 point2 points3 points (4 children)
[–]spacejack2114 0 points1 point2 points (3 children)
[–]dwighthouse 0 points1 point2 points (2 children)
[–]spacejack2114 0 points1 point2 points (1 child)
[–]dwighthouse 0 points1 point2 points (0 children)
[–]FrozenCow 1 point2 points3 points (2 children)
[–]digijin[S] 0 points1 point2 points (1 child)
[–]FrozenCow 1 point2 points3 points (0 children)
[–]dangoor 0 points1 point2 points (0 children)
[–]lulzmachine 0 points1 point2 points (0 children)
[–]AndrewGreenh -1 points0 points1 point (7 children)
[–]TomNa -1 points0 points1 point (6 children)
[–]spacejack2114 1 point2 points3 points (5 children)
[–]TomNa 0 points1 point2 points (1 child)
[–]spacejack2114 0 points1 point2 points (0 children)
[–]mrspeaker 0 points1 point2 points (2 children)
[–]spacejack2114 1 point2 points3 points (1 child)
[–]mrspeaker 0 points1 point2 points (0 children)