By default it looks like immer is using reference counting, a memory allocator with an internal free list and a spinlock for locking.
We should probably not use a free list and let tcmalloc handle free'd memory efficiently. We should investigate what the lock is used for and determine what is the correct lock primitive for our needs.