In perl.git, the branch smueller/sort has been created

<http://perl5.git.perl.org/perl.git/commitdiff/44023d35ab8f7b492d3a56bcbf4473e71cc8eb9c?hp=0000000000000000000000000000000000000000>

        at  44023d35ab8f7b492d3a56bcbf4473e71cc8eb9c (commit)

- Log -----------------------------------------------------------------
commit 44023d35ab8f7b492d3a56bcbf4473e71cc8eb9c
Author: Steffen Mueller <smuel...@cpan.org>
Date:   Fri Nov 18 08:08:11 2011 +0100

    Some tests for the sort deref optimization
    
    Specifically in the context of overloading.

M       t/op/sort.t

commit c07cba0a97f3af4bc72a9eb8414b2bf5ffd37ce7
Author: Steffen Mueller <smuel...@cpan.org>
Date:   Thu Nov 17 14:11:07 2011 +0100

    FIXME this can't go into blead as is
    
    Implements special-purpose sort functions that do
    array-dereferencing. This change implements
    
      { $a->[0] <=> $b->[0] }
    
    and
    
      { $a->[0] cmp $b->[0] }
    
    for all of numeric, integer, and string sorts.
    
    It supports overload magic inner SVs (see tests added in next
    commit). I believe it also handles the locale cmp case in the same way
    as the normal comparison does, but since I don't properly understand
    locales, the tests don't cover that.
    
    The net effect of this is a speed-up by over 2x on my machine when
    doing a Schwartzian transform or similar technique involving sorting on
    the first element of an array. I tried a variety of array sizes.

M       embed.fnc
M       embed.h
M       op.c
M       pp_sort.c
M       proto.h

commit f2edbd641d5947e4ecbef486301900e749f44d75
Author: Steffen Mueller <smuel...@cpan.org>
Date:   Tue Nov 15 18:51:15 2011 +0100

    FIXME this can't go into blead as is
    
    This implements detection of a basic Schwartzian transform-style sort
    block and removes it from the OP tree. It sets a new flag on the sort OP
    which will indicate that this sort needs to be performed by one of the
    special-case optimized C functions in pp_sort. The actual implementation
    of that function is pending.

M       embed.fnc
M       embed.h
M       op.c
M       op.h
M       proto.h

commit b1afe1b35b8f02a5c266c96fdab7a67e183fbb44
Author: Steffen Mueller <smuel...@cpan.org>
Date:   Mon Nov 14 20:50:41 2011 +0100

    Rename variable for clarity

M       op.c
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to