3 ms·
> because if you memcpy pointers they would cause structure sharing, that I'm trying to avoid, hence a deep clone. I'm probably that guy that pipes up when he
by Gibbon1 3y ago
> because if you memcpy pointers they would cause structure sharing, that I'm trying to avoid, hence a deep clone.
I'm probably that guy that pipes up when he doesn't know what he's talking about but.
You can store offsets instead of pointers. You can then just memcpy the whole thing and it'll just work as long as everything is self contained.
- samsquire 3y agoThanks for your reply, you're right. You know what you're talking about. This is what smol_world does, it uses 32 bit indexes. I really like the idea of smol_world, I just don't know if you can easily .clone() it.