another important point for sorting algorithms is their memory comsumption, and the GRT offers the worst behaviour for that aspect:s/iter BrowserUK packed_default SortKey BrowserUK 71.7 -- -66% -79% packed_default 24.5 193% -- -38% SortKey 15.2 372% 61% --
(Memchmark results are approximate, but accurate enough to show the difference)use Memchmark qw(cmpthese); ... cmpthese(BrowserUK => \&BrowserUK, packed_default => \&packed_default, SortKey => \&SortKey ); __end__ test: BrowserUK, memory used: 102006784 bytes test: SortKey, memory used: 85598208 bytes test: packed_default, memory used: 182788096 bytes
In reply to Re^4: Sorting a hash of arrays based on a particular array element.
by salva
in thread Sorting a hash of arrays based on a particular array element.
by aditya.singh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |