in reply to Unusual sorting requirements; comparing three implementations.
Ignore. Dumb mistake. Corrected:
... sub x { my @sorted = map $_->[1], sort{ $a->[0] cmp $b->[0] } map[ $_->title eq 'Manager' ? 'A'.$_->name : 'B'.$_->name, $_ ], @employees; } cmpthese( -1, { obvious => \&obvious, subtle => \&subtle, functional => \&functional, x => \&x, }); __END__ C:\test>junk87 Rate obvious subtle functional x obvious 185/s -- -15% -60% -83% subtle 218/s 18% -- -54% -80% functional 469/s 153% 115% -- -58% x 1111/s 500% 411% 137% --
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Unusual sorting requirements; comparing three implementations.
by afoken (Chancellor) on Oct 24, 2012 at 11:19 UTC | |
by BrowserUk (Patriarch) on Oct 24, 2012 at 11:31 UTC | |
by tobyink (Canon) on Oct 24, 2012 at 16:31 UTC | |
by BrowserUk (Patriarch) on Oct 24, 2012 at 18:40 UTC | |
by tobyink (Canon) on Oct 24, 2012 at 21:07 UTC | |
| |
by BrowserUk (Patriarch) on Oct 24, 2012 at 18:50 UTC |
In Section
Meditations