in reply to Useful information from Visual Studio compiler logs.

#Guttman-Rosler Transform! my @sorted = map{ substr $_, 5; }sort { $b cmp $a } map{ m[,\s+(\d+)] ? sprintf '%05d%s', $1, $_ : () } @msgs; #End GRT

As confirmed here this is not a GRT. To qualify as a GRT, it must have a bald sort block. It's the bald sort block that gives the GRT a speed edge over its Schwartzian Transform cousin. See also Advanced Sorting - GRT - Guttman Rosler Transform.

Replies are listed 'Best First'.
Re: Re: Useful information from Visual Studio compiler logs.
by theorbtwo (Prior) on May 27, 2004 at 16:55 UTC

    BTW, $a <=> $b, $b <=> $a, $a cmp $b, $b cmp $a, and no expilcit comparator should be all the same speed in recent perls. (But I'm too lazy to benchmark.)

Re: Re: Useful information from Visual Studio compiler logs.
by McMahon (Chaplain) on May 27, 2004 at 14:47 UTC
    Oh, well. It *started off* as a GRT. It still works nice. =)