On Jun 23, 2012, at 10:16 AM, Reini Urban wrote: > On Wed, Jun 20, 2012 at 11:53 AM, Father Chrysostomos <sprout@cpan.org> wrote: >> Dave Mitchell asked: >>> Whatever happened to PERL_COPY_ON_WRITE? Was it a failure? Should >>> it be expunged, or revived? Or left to rot? >> >> I asked the same question on the eleventh of December. I am still >> awaiting a response. >> >> http://www.nntp.perl.org/group/perl.perl5.porters/;msgid=60396028-D993-4565-8EE9-3746ABB79C27@cpan.org > > I don't think it was a failure. We have now shared strings for > bareword hash keys, files and stash names in strtab already. > The remaining problem as I see it, is how to apply that to the general > case for which strtab might not scale and be overkill. > And as Nick wrote, rewrite his old COW on top of those new shared hash keys. To put existing strings in the string table, each has to be allocated as a shared_he, which means padding the beginning with 20 bytes on 32-bit platforms. I tried doing that and found that the bookkeeping overhead outweighed the cost of copying most of the time. The ‘OLD’ copy-on-write system works parallel to string tables, by linking SVs in a loop when the PV needs to be copied from one to another, instead of actually copying it. I think it would be faster than the string table in general.Thread Previous