Performance would be night and day, immutable collections clone memory so you likely looking at a lot brk syscalls
Charlie Tapping
10/30/2023, 4:17 PM
Could be interesting thing to add to the benchmark suite though as I’m curious myself
➕ 2
Charlie Tapping
10/31/2023, 11:02 AM
I spent some more time thinking about this, immutable map is not a replacement for concurrent map. It doesn’t let multiple threads manipulate the same shared state. When you mutate it you get back a new map. It two threads update the same reference to a map concurrently, then one of the changes will not exist, which ever thread updates the reference first would have their change lost. For this reason it doesn’t make sense to include it in the benchmark as its not apples to apples and can’t actually do what we need