The following module was proposed for inclusion in the Module List:
modid: Sort::Fast
DSLIP: adcfg
description: sort one dimension arrays faster using XS
userid: ATOOMIC (Nicolas R.)
chapterid: 6 (Data_Type_Utilities)
communities:
similar:
Sort::Bucket
rationale:
The goal is to wrap c subroutines to implement a fast sort
algorithm : heapsort, quicksort, mergesort...
Will only be usable on one dimension array of strings or integers.
Depending on the size of the array it can improve performance by up
to x3, and 1.5x in average for small arrays ( more for larger arrays
).
At this step I ve only implement sorting of integers but will add
string for the first public release.
Here are the first bench, xs::sort method vs a regular sort on
random arrays :
+ 1000 arrays * 10 rows ( integers ) merge -> 557/s req/sec perl ->
565/s req/sec heap -> 625/s req/sec quick -> 637/s req/sec
+ 100 arrays * 100 rows ( integers ) perl -> 645/s req/sec merge ->
729/s req/sec ** heap -> 866/s req/sec *** quick -> 946/s req/sec
+ sort one array * 1_000_000 rows ( integers ) perl -> 1.89/s
req/sec ** merge -> 4.50/s req/sec ** heap -> 4.74/s req/sec ***
quick -> 6.43/s req/sec
enteredby: ATOOMIC (Nicolas R.)
enteredon: Wed Dec 28 16:46:57 2011 GMT
The resulting entry would be:
Sort::
::Fast adcfg sort one dimension arrays faster using XS ATOOMIC
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=f8900000_a9ec9b1a2f8b2054&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=f8900000_a9ec9b1a2f8b2054&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Sort%3A%3AFast