|
|
|
|
|
by kadoban
1423 days ago
|
|
Take your favorite immutable data structure. Fix it in your mind. Now, call it mutable, but don't change a thing. Congratulations, it's now a mutable data structure that's exactly as fast as your favorite immutable one. _But_ you now have extra opterations you can perform to optimize slow parts if you can. You have strictly more power than you started with, because you can modify data. You don't have to, but you can. Just don't make any bad optimizations. If some attempt to make it better instead makes it worse, go back to the starting point and try something else. |
|