develooper Front page | perl.perl5.porters | Postings from October 2012

COW status (Re: Stupid COW benchmarks ([perl #114820] Bleadperl v5.17.3-255-g6502e08 breaks SARTAK/Path-Dispatcher-1.04.tar.gz))

From:
Father Chrysostomos via RT
Date:
October 16, 2012 10:14
Subject:
COW status (Re: Stupid COW benchmarks ([perl #114820] Bleadperl v5.17.3-255-g6502e08 breaks SARTAK/Path-Dispatcher-1.04.tar.gz))
Message ID:
rt-3.6.HEAD-11172-1350407682-953.114820-14-0@perl.org
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




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About