From: Matt S Trout Date: Mon, 21 Jun 2010 00:02:25 +0000 (+0100) Subject: collapse threading doc changes as suggested by Nicholas, adding in notes on the addit... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d157b07717ee64a3d162a8882892d4187777823;p=p5sagit%2Fp5-mst-13.2.git collapse threading doc changes as suggested by Nicholas, adding in notes on the additional commits related to dTHX deferral --- diff --git a/pod/perl5132delta.pod b/pod/perl5132delta.pod index 9d550ae..1926bf2 100644 --- a/pod/perl5132delta.pod +++ b/pod/perl5132delta.pod @@ -201,43 +201,23 @@ This module hasn't been updated since 1996 so we can't recommend it any more Only allocate entries for @_ on demand - this not only saves memory per subroutine defined but should hopefully improve COW behaviour (77bac2). -Multiple small improvements to threads: +=head2 Multiple small improvements to threads -=over 4 - -=item * - -Change the internal structured of thread->params from an SV (RV) to an AV -- so we now pass around and store the array directly, rather than creating, -holding and dereferencing a reference to it (78b7eff). - -=item * - -Change S_ithread_create() params from a single AV* to a pair of SV** pointers. -This saves creating, duplicating and freeing and AV, which is only ever used for -an internal calling convention (4cf5ea). - -=item * - -Remove redundant hv_exists() calls from ithread_create()'s spec parser (b1faab). - -=item * +The internal structures of threading now make fewer API calls and fewer +allocations, resulting in noticeably smaller object code. Additionally, +many thread context checks have been deferred so that they're only done +when required (although this is only possible for non-debugging builds). -Skip unnecessary newAV() in ithread_create() (39f3f7). +=head2 Eliminated xhv_fill from struct xpvhv -=item * - -Avoid duping pads created for recursion since there's no point pre-allocating -the same memory in the new thread (6de654). - -=back +This saves 1 IV per hash and on some systems will cause struct xpvhv to +become cache aligned. To avoid this memory saving causing a slowdown +elsewhere, boolean use of HvFILL now calls HvTOTALKEYS instead (which +is equivalent) - so while the fill data when actually required is now +calculated on demand, the cases when this needs to be done should be +few and far between (f4431c .. fcd245). -Eliminated xhv_fill from struct xpvhv: This saves 1 IV per hash and on some -systems will cause struct xpvhv to become cache aligned. To avoid this -memory saving causing a slowdown elsewhere, boolean use of HvFILL now -calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when -actually required is now calculated on demand, the cases when this needs to -be done should be few and far between (f4431c .. fcd245). +=head2 Optimisation of regexp engine string comparison work The foldEQ_utf8 API function for case-insensitive comparison of strings (which is used heavily by the regexp engine) was substantially refactored and