Intern objects in memory.
This is similar to internment crate but with changes for performance and flexibility.
internment