"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
thanks, but I'm confused about the "for example hash keys were already copy-on-write" comment.
By principle hash-keys are (and must be) immutable. Immutable data can be shared w/o allocating new memory, while mutable objects need to be copied to separate space. COW is a performance trick to "lazily" delay that copy to the time when the mutation (the write) happens. So there must be a misunderstanding, since hash-keys are always read-only, there is never a write.
Cheers Rolf In reply to Re^2: do separate hashes share common keys?
by LanX
|
|