On Mon Oct 08 08:40:33 2012, sprout wrote: > On Mon Oct 08 00:37:16 2012, sprout wrote: > > You can play with it if you want. It’s on the sprout/ookow branch > > (SvOOK-style COW [except it does not involve SvOOK any more]). > > I forgot to mention it requires -Accflags=-DPERL_NEW_COPY_ON_WRITE. And now I have all core tests passing, except Peek.t, which will need tweaking when I have finished. I still need to do some benchmarks to find a threshold where copy-on-write speeds things up (and then only do COW above that threshold). We may need two thresholds depending on whether the destination string has a buffer already, and whether that buffer is big enough. (Copying may be faster than freeing a buffer.) I also need to allocate that extra byte for strings above the COW threshold, to store the buffer’s reference count. And then I need to see whether eliminating swipe makes any speed difference. And then I need to benchmark it against some real code. (Test.Simple’s test suite run with WWW::Scripter might work well. [See <https://rt.cpan.org/Ticket/Display.html?id=50462#txn-681840>. Downloading it and using file:/// URLs will eliminate any network latency.] Although a test suite is not typical code, as it tries to exercise every code path, Test.Simple’s tests are testing all of Test.Simple’s code paths, not all of JE’s. So JE may be a good buffer that translates atypical JS code into typical Perl code.) -- Father Chrysostomos