Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds descending order sort to argsort #144

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

sterrettm2
Copy link
Contributor

This patch adds support for descending argsort and tests for it.

Comparing simdargsort.*random_1 to simd_revargsort.*random_1 (from ./benchexe)
Benchmark                                                                           Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------------------------
[simdargsort.*random_1 vs. simd_revargsort.*random_1]28/int64_t                  +0.0351         +0.0352           700           724           700           724
[simdargsort.*random_1 vs. simd_revargsort.*random_1]k/int64_t                   +0.0106         +0.0106         10495         10607         10495         10606
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00k/int64_t                 +0.0127         +0.0128       1984814       2010041       1984600       2010030
[simdargsort.*random_1 vs. simd_revargsort.*random_1]m/int64_t                   +0.0125         +0.0127      35326504      35769670      35321177      35768358
[simdargsort.*random_1 vs. simd_revargsort.*random_1]0m/int64_t                  -0.0015         -0.0015    1008048326    1006544869    1007932916    1006469941
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00m/int64_t                 -0.0008         -0.0007   18740949217   18725879386   18738472186   18724539794
[simdargsort.*random_1 vs. simd_revargsort.*random_1]28/uint64_t                 +0.0265         +0.0266           713           732           713           732
[simdargsort.*random_1 vs. simd_revargsort.*random_1]k/uint64_t                  +0.0110         +0.0111         10492         10607         10491         10607
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00k/uint64_t                +0.0089         +0.0090       1984786       2002470       1984602       2002367
[simdargsort.*random_1 vs. simd_revargsort.*random_1]m/uint64_t                  +0.0142         +0.0144      35019575      35517267      35011788      35514938
[simdargsort.*random_1 vs. simd_revargsort.*random_1]0m/uint64_t                 +0.0014         +0.0015    1005610608    1006975763    1005453293    1006926654
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00m/uint64_t                -0.0016         -0.0015   18755431656   18725763887   18753024082   18724198698
[simdargsort.*random_1 vs. simd_revargsort.*random_1]28/double                   +0.0341         +0.0341           599           620           599           620
[simdargsort.*random_1 vs. simd_revargsort.*random_1]k/double                    +0.0134         +0.0134          9352          9477          9351          9477
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00k/double                  +0.0081         +0.0081       1936659       1952396       1936464       1952241
[simdargsort.*random_1 vs. simd_revargsort.*random_1]m/double                    +0.0138         +0.0138      34428106      34903675      34426293      34900722
[simdargsort.*random_1 vs. simd_revargsort.*random_1]0m/double                   -0.0006         -0.0005    1009933569    1009357736    1009741924    1009258251
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00m/double                  -0.0010         -0.0009   18553309038   18535103083   18550992608   18533609826
[simdargsort.*random_1 vs. simd_revargsort.*random_1]28/int32_t                  +0.0138         +0.0138           621           629           621           629
[simdargsort.*random_1 vs. simd_revargsort.*random_1]k/int32_t                   +0.0173         +0.0173         10487         10668         10486         10668
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00k/int32_t                 +0.0187         +0.0187       1715798       1747838       1715659       1747715
[simdargsort.*random_1 vs. simd_revargsort.*random_1]m/int32_t                   +0.0159         +0.0160      27752094      28193729      27747527      28191687
[simdargsort.*random_1 vs. simd_revargsort.*random_1]0m/int32_t                  +0.0003         +0.0004     813506313     813786134     813346264     813637191
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00m/int32_t                 -0.0026         -0.0026   16372721091   16329909619   16370509091   16328529689
[simdargsort.*random_1 vs. simd_revargsort.*random_1]28/uint32_t                 +0.0167         +0.0167           620           631           620           631
[simdargsort.*random_1 vs. simd_revargsort.*random_1]k/uint32_t                  +0.0160         +0.0161         10499         10667         10498         10667
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00k/uint32_t                +0.0081         +0.0081       1726447       1740387       1726247       1740274
[simdargsort.*random_1 vs. simd_revargsort.*random_1]m/uint32_t                  +0.0087         +0.0088      27792174      28034826      27789285      28034417
[simdargsort.*random_1 vs. simd_revargsort.*random_1]0m/uint32_t                 +0.0010         +0.0010     813359007     814143233     813226954     814051882
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00m/uint32_t                -0.0024         -0.0024   16363564108   16323686834   16361610455   16322444405
[simdargsort.*random_1 vs. simd_revargsort.*random_1]28/float                    +0.0235         +0.0236           667           683           667           683
[simdargsort.*random_1 vs. simd_revargsort.*random_1]k/float                     +0.0138         +0.0138          9924         10060          9923         10060
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00k/float                   +0.0121         +0.0122       1811155       1833046       1810910       1832930
[simdargsort.*random_1 vs. simd_revargsort.*random_1]m/float                     +0.0074         +0.0074      28442530      28653620      28439292      28649646
[simdargsort.*random_1 vs. simd_revargsort.*random_1]0m/float                    +0.0008         +0.0008     824497949     825123277     824381667     825026386
[simdargsort.*random_1 vs. simd_revargsort.*random_1]00m/float                   -0.0040         -0.0040   16435398683   16369311769   16433216995   16368255149
OVERALL_GEOMEAN                                                                  +0.0100         +0.0101             0             0             0             0

Copy link
Contributor

@r-devulap r-devulap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @sterrettm2!

@r-devulap r-devulap merged commit 8cc37bd into intel:main Apr 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants