Change 33334 by [EMAIL PROTECTED] on 2008/02/18 18:12:12
Enable caching of strxfrm() results also for readonly SVs as
returned e.g. by "keys %hash". This speeds up sorting of lots
of hash keys significantly. See also:
Subject: Slowdown of "sort keys %hash" under "use locale"
From: Marcus Holland-Moritz <[EMAIL PROTECTED]>
Date: Fri, 15 Feb 2008 17:00:15 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/sv.c#1507 edit
Differences ...
==== //depot/perl/sv.c#1507 (text) ====
Index: perl/sv.c
--- perl/sv.c#1506~33304~ 2008-02-14 00:09:36.000000000 -0800
+++ perl/sv.c 2008-02-18 10:12:12.000000000 -0800
@@ -6494,11 +6494,6 @@
Safefree(mg->mg_ptr);
s = SvPV_const(sv, len);
if ((xf = mem_collxfrm(s, len, &xlen))) {
- if (SvREADONLY(sv)) {
- SAVEFREEPV(xf);
- *nxp = xlen;
- return xf + sizeof(PL_collation_ix);
- }
if (! mg) {
#ifdef PERL_OLD_COPY_ON_WRITE
if (SvIsCOW(sv))
End of Patch.