in reply to Re^4: Unusual sorting requirements; comparing three implementations.
in thread Unusual sorting requirements; comparing three implementations.
Not sure if your computer's architecture is radically different to mine or something, ...
The first difference I notice is that your fastest iterating solution -- 671/s -- is only half as fast as my fastest iterating solution -- 1100/s.
I seriously doubt my 3 y/o Core2Quad Q6600 @2.4GHz is twice as fast as your hardware.
So the major difference probably comes down to the fact that I couldn't be bothered to install yet another slow-accessor constructor, so I manually code my Person Class:
package Person { sub new{ my $p = shift; bless { @_ }, $p } sub name{ $_[0]->{name } } sub title{ $_[0]->{title} } }
After that, why your results should be relatively different to mine I have no idea:
But mine are consistent:
C:\test>date /t & time/t && junk87 24/10/2012 19:39 Rate obvious subtle functional x obvious 189/s -- -16% -60% -83% subtle 226/s 19% -- -52% -80% functional 471/s 149% 109% -- -57% x 1101/s 482% 388% 134% --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Unusual sorting requirements; comparing three implementations.
by tobyink (Canon) on Oct 24, 2012 at 21:07 UTC | |
by BrowserUk (Patriarch) on Oct 24, 2012 at 21:43 UTC | |
by Anonymous Monk on Oct 25, 2012 at 02:06 UTC | |
by BrowserUk (Patriarch) on Oct 25, 2012 at 04:59 UTC | |
by Anonymous Monk on Oct 25, 2012 at 08:06 UTC | |
by BrowserUk (Patriarch) on Oct 24, 2012 at 21:31 UTC | |
by tobyink (Canon) on Oct 24, 2012 at 21:53 UTC | |
by BrowserUk (Patriarch) on Oct 24, 2012 at 22:04 UTC |